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

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

Merged
merged 3 commits into from
Dec 4, 2018

Conversation

ronso0
Copy link
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.
if (m_displayKey) {
keyStr = KeyUtils::keyToString(key);
}
else if (m_displayCents) {
Copy link
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
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
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