Skip to content

Conversation

@cbjeukendrup
Copy link
Member

Avoid text clipping in dropdowns
Avoid hard-coded widths
Remove unnecessary property assignments
etc

N.B. the dropdown changes also affect the Measure numbers and Repeats page, so those need a regression check

@cbjeukendrup cbjeukendrup requested a review from avvvvve October 25, 2025 19:01
@avvvvve
Copy link

avvvvve commented Oct 27, 2025

I don't think it's the best idea to have the dropdown hug the width of its contents. It's one thing that it's a little clunky that adjacent dropdowns all have different widths, but if you choose a really short word and then reopen the dropdown, the dropdown itself isn't wide enough to display the longer labels.

Screen.Recording.2025-10-27.at.12.12.13.PM.mov

I would just leave the widths fixed. Perhaps those three in the playback section just need to be wider—in Preferences the dropdowns are 208px so we could try that. Generally I think it would be good to make it so the expanded dropdown contents can exceed the width of the dropdown button, but that's a note or the app in general, not just Styles.

The reset buttons certainly are looking better though!

@cbjeukendrup
Copy link
Member Author

The fixed widths were problematic for translations though. However I can turn them into minimum widths, allowing them to grow wider when necessary. I'll also change it so that the width is based on the wisest dropdown item rather than the current one.

(The thing is that these are not the same drop downs as we use elsewhere, because don't work well when used in QML pages that are embedded in QtWidgets... so they might behave a bit differently.)

@avvvvve
Copy link

avvvvve commented Oct 30, 2025

Can it be that the width of all three is based on the widest dropdown option, not just the widest dropdown (i.e. taking into account long options that are not currently selected?)

Seems like the widest string we have translated (for these three dropdowns at least) is in Greek, which would give us this:
image

Not so bad. I worry about future long strings making this too big, but hopefully we remake Styles entirely before that happens :)

@cbjeukendrup cbjeukendrup force-pushed the editstyle/chordsymbols/tweaks branch from 575b43a to f3474e4 Compare October 30, 2025 22:49
@cbjeukendrup
Copy link
Member Author

@avvvvve Ready for another round of testing:

  • the width of each dropdown is now based on the longest option in that dropdown
  • the three playback dropdowns are now additionally stretched to be all three the same width

Avoid text clipping in dropdowns
Avoid hard-coded widths
Remove unnecessary property assignments
etc

N.B. the dropdown changes also affect the Measure numbers and Repeats page, so those need a regression check
removed hardcoded maximum width
@cbjeukendrup cbjeukendrup force-pushed the editstyle/chordsymbols/tweaks branch from 9b4b09c to 5ab38c7 Compare October 31, 2025 01:04
@avvvvve
Copy link

avvvvve commented Oct 31, 2025

Awesome, this is looking good now! Thanks @cbjeukendrup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants