-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Bar numbers revamp #28662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Bar numbers revamp #28662
Conversation
93c612f
to
a754af1
Compare
src/notation/qml/MuseScore/NotationScene/internal/EditStyle/BarNumbersPage.qml
Outdated
Show resolved
Hide resolved
src/notation/qml/MuseScore/NotationScene/internal/EditStyle/BarNumbersPage.qml
Outdated
Show resolved
Hide resolved
src/notation/qml/MuseScore/NotationScene/internal/EditStyle/BarNumbersPage.qml
Outdated
Show resolved
Hide resolved
f6379fc
to
10b42ca
Compare
10b42ca
to
3e46671
Compare
src/importexport/guitarpro/tests/guitarbendimporter_data/bend_hold-gp.mscx
Outdated
Show resolved
Hide resolved
3e46671
to
4db8b3b
Compare
connect(item, &StyleItem::valueChanged, this, [this]() { emit measureNumberPosAboveChanged(); }); | ||
} | ||
|
||
return item; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbjeukendrup Is this ok? I couldn't think of a better way of doing this (connecting the changing signal of one style to the UI of another). In this specific case, the "Offset" in this style page should match the offset of the chosen text style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of overriding buildStyleItem
, you could perhaps do the following in the MeasureNumbersPageModel
constructor:
connect(measureNumberTextStyle(), &StyleItem::valueChanged, this, [this]() { emit measureNumberPosAboveChanged(); });
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing the connect
in the constructor causes an assertion failure in ioccontext.cpp line 41 😭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Then it would need to be done in a load
or classBegin
method...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to leave it as it is, for now, this PR needs to be merged. I'll come back to it later if needed
connect(item, &StyleItem::valueChanged, this, [this]() { emit measureNumberPosAboveChanged(); }); | ||
} | ||
|
||
return item; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of overriding buildStyleItem
, you could perhaps do the following in the MeasureNumbersPageModel
constructor:
connect(measureNumberTextStyle(), &StyleItem::valueChanged, this, [this]() { emit measureNumberPosAboveChanged(); });
eb5cbaa
to
4b4e855
Compare
|
||
bool isTopStave = score()->staves().front() == this; | ||
bool isSystemObjectStaff = muse::contains(score()->systemObjectStaves(), const_cast<Staff*>(this)); | ||
return isTopStave && m_showMeasureNumbers != AutoOnOff::OFF || isSystemObjectStaff && m_showMeasureNumbers == AutoOnOff::ON; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return isTopStave && m_showMeasureNumbers != AutoOnOff::OFF || isSystemObjectStaff && m_showMeasureNumbers == AutoOnOff::ON; | |
return (isTopStave && m_showMeasureNumbers != AutoOnOff::OFF) || (isSystemObjectStaff && m_showMeasureNumbers == AutoOnOff::ON); |
@@ -117,6 +117,7 @@ static const QStringList ALL_TEXT_STYLE_SUBPAGE_CODES { | |||
"copyright", | |||
"page-number", | |||
"measure-number", | |||
"measure-number-alternate", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be handled in EditStyle::subPageCodeForElement
RowLayout { | ||
spacing: 4 | ||
|
||
StyledDropdown { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StyledDropdown
is broken and opens behind the style dialog. This is due to (our favourite!) Qt widgets and QML components not playing nicely together. I think the root cause is that StyledDropdown
doesn't implement the QML popup type. I battled this for a long time when making the chord symbols page and eventually had to give up and create the ComboBoxDropdown
element to use in the style dialog.
Complete rewrite of the "Measure numbers" style page including few relevant new options: