Skip to content

Conversation

@sbonaime
Copy link
Contributor

Description of Change(s)

I add the option to draw or not draw black lines around staff. Maybe the name of this option could be changed !

Capture d’écran 2026-01-13 à 12 22 48 Capture d’écran 2026-01-13 à 12 15 56

Copilot AI review requested due to automatic review settings January 13, 2026 11:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a user preference to control the visibility of the bounding rectangle drawn around music notation systems. The setting is persisted through the application's settings system and can be toggled via the preferences dialog.

Changes:

  • Added a new boolean setting DrawStaffRectangle with a default value of true to preserve existing behavior
  • Created UI controls in the preferences dialog to allow users to toggle the rectangle visibility
  • Integrated the setting into ScoreArea to load and respond to changes dynamically
  • Modified the SystemRenderer to conditionally draw the system bounding rectangle based on the user's preference

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
source/app/settings.h Declares the new DrawStaffRectangle setting
source/app/settings.cpp Defines the DrawStaffRectangle setting with default value of true
source/dialogs/preferencesdialog.ui Adds checkbox UI control for the rectangle drawing preference
source/dialogs/preferencesdialog.cpp Implements loading and saving of the rectangle drawing preference
source/app/scorearea.h Adds getter method and loader for the rectangle drawing setting
source/app/scorearea.cpp Implements rectangle drawing setting loading and change subscription
source/painters/systemrenderer.cpp Conditionally draws system rectangle based on the user preference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

extern const Setting<std::vector<std::string>> RecentFiles;
extern const Setting<ScoreTheme> Theme;
extern const Setting<bool> OpenFilesInNewWindow;
extern const Setting<bool> DrawStaffRectangle;
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setting name "DrawStaffRectangle" is misleading. Based on the code context, this setting controls the rectangle around the entire system (which can contain multiple staves), not individual staff rectangles. The comment on line 84 says "Draw the bounding rectangle for the system." Consider renaming this to "DrawSystemRectangle" or "DrawSystemBorder" for clarity. This would require updating:

  • The setting name in settings.h/cpp
  • The UI label and checkbox names
  • The method names in scorearea.h/cpp
  • The member variable name

Copilot uses AI. Check for mistakes.
<item row="3" column="0">
<widget class="QLabel" name="drawStaffRectangleLabel">
<property name="text">
<string>Draw Staff Rectangle:</string>
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This UI label says "Draw Staff Rectangle" but the feature actually controls drawing the rectangle around the entire system (which can contain multiple staves). Consider changing this to "Draw System Rectangle:" or "Draw System Border:" to accurately reflect what the setting does.

Suggested change
<string>Draw Staff Rectangle:</string>
<string>Draw System Rectangle:</string>

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also change to left alignment of elements in the preferences window and larger window

from
from
to
to

@cameronwhite
Copy link
Member

Thanks, the changes look good to me!

The naming is the only thing I was unsure about - as the Copilot review also pointed out, the rectangle is actually around the whole system (group of staves), not each individual staff.

How about Draw System Outline? There is already a System Spacing option above it so using the term System should be clear

@sbonaime sbonaime changed the title Draw Staff Rectangle Draw System Rectangle Jan 15, 2026
@sbonaime sbonaime changed the title Draw System Rectangle Draw System Outline Jan 15, 2026
@sbonaime
Copy link
Contributor Author

Thanks, the changes look good to me!

The naming is the only thing I was unsure about - as the Copilot review also pointed out, the rectangle is actually around the whole system (group of staves), not each individual staff.

How about Draw System Outline? There is already a System Spacing option above it so using the term System should be clear

done !

@cameronwhite
Copy link
Member

Thanks!

@cameronwhite cameronwhite merged commit 1d68184 into powertab:master Jan 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants