Skip to content

let Key widget display key, cents or both (or nothing)#1925

Merged
daschuer merged 3 commits intomixxxdj:2.2from
ronso0:key-display-tweak
Dec 4, 2018
Merged

let Key widget display key, cents or both (or nothing)#1925
daschuer merged 3 commits intomixxxdj:2.2from
ronso0:key-display-tweak

Conversation

@ronso0
Copy link
Copy Markdown
Member

@ronso0 ronso0 commented Nov 29, 2018

this is supposed to fix the position of key +- buttons within the expanding key edit widget in Deere.
Before, those buttons where moving under the mouse cursor when the Key widget switches in between short<>long strings of key/cents.

This introduces a <DisplayKey> tag to use the WKey widget to display the key value only, cents only or both.
In Deere I used it to have two separate widgets for key and cents, with static overall width:

  • cents string uses the space it needs
  • key string fills remaining space, is aligned left and cut at the right
    I choose a medium width for key/cents so OpenKey/Lancelot values don't look lonesome, and most single traditional values fit in nicely. Only double values like D♯m/E♭m are cropped.

Traditional notation:
traditional

OpenKey:
openkey

This alllows to have separate widgets for key & key cents that
for example can react to space constraints individually.
Comment thread src/widget/wkey.cpp Outdated
if (m_displayKey) {
keyStr = KeyUtils::keyToString(key);
}
else if (m_displayCents) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is it really "else" here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

woopsy..such a small PR, and such a mistake.... fixed.

@daschuer
Copy link
Copy Markdown
Member

daschuer commented Dec 4, 2018

LGTM. Thank you.

@daschuer daschuer merged commit a3dd5e8 into mixxxdj:2.2 Dec 4, 2018
@ronso0 ronso0 deleted the key-display-tweak branch December 6, 2018 14:05
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