Skip to content
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

fix #271198: Custom noteheads implementation for 2.3 #3640

Merged
merged 2 commits into from
May 12, 2018

Conversation

anatoly-os
Copy link
Contributor

Based on #3631 + additional font fallback implementation.

@anatoly-os
Copy link
Contributor Author

The code compiles, but the drumset editor doesn't work. @lasconic please review the changes. I assume I did not enough changes for the correct fallback.

@anatoly-os anatoly-os self-assigned this Apr 23, 2018
@@ -745,5 +743,81 @@
},
"noteLongaSquareUp": {
"codepoint": "U+e1c4"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm just starting, so maybe I miss something but if the font doesn't have these glyphs, then they shouldn't be listed here.

@anatoly-os anatoly-os force-pushed the CustomNoteheads23 branch 2 times, most recently from 7f0839a to 88f6e06 Compare May 11, 2018 11:24
@anatoly-os anatoly-os force-pushed the CustomNoteheads23 branch 3 times, most recently from 7496bdf to 61e5bf1 Compare May 11, 2018 12:59
@@ -732,8 +732,6 @@
"ornamentLinePrall": {
"codepoint": "U+e18d"
},

Copy link
Contributor

Choose a reason for hiding this comment

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

needed?

QPainter painter(&image);
const QRectF& bbox = ScoreFont::fallbackFont()->bbox(id, 1);
//default scale is 1.3, use smaller scale for large noteheads symbols
qreal mag = std::min(1.3, std::min(w / bbox.width(), h / bbox.height()));
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it's my retina display but 2.6 looks a lot better on my mac. Same for master btw.
Maybe we should use *qApp->devicePixelRatio()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will experiment with it.

@@ -102,14 +118,83 @@ EditDrumset::EditDrumset(const Drumset* ds, QWidget* parent)
pitchList->setColumnWidth(1, 60);
pitchList->setColumnWidth(2, 30);

QStringList validNoteheadRanges = { "Noteheads", "Slash noteheads", "Round and square noteheads", "Shape note noteheads", "Shape note noteheads supplement" };
Copy link
Contributor

Choose a reason for hiding this comment

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

"Shape note noteheads supplement" doesn't exist in 2.3

staffLine->setEnabled(enable);
stemDirection->setEnabled(enable);
drumNote->setEnabled(enable);
label_2->setEnabled(enable);
Copy link
Contributor

Choose a reason for hiding this comment

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

worth giving some meaningful names no ?

…or percussion instrument

Added "Custom" item to noteheads combobox, removed "invalid" item, set selection at the first tree element when opening the drumset editor, added interaction between custom noteheads group and notehead group combobox, fixed tab order.
Fixed drawing custom noteheads in preview window: Set cachedSymbol from current quarter note combobox value and added slot to update preview on chaning quarter value.
Fixed shadow note drawing: Apply specific notehead from drumset data.

Manually merged changes for drumset palette and editor from master

See 0214736
@anatoly-os anatoly-os merged commit 6257956 into musescore:2.3 May 12, 2018
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.

None yet

2 participants