lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Too short space for "Note Lock"

Open anytizer opened this issue 2 years ago • 9 comments

The width of note lock dropdown list is small, and hence full text is hiding.

image

anytizer avatar Jan 17 '23 07:01 anytizer

All the boxes have this issue. image Since we don't know the possible length of a user-added scale's name, for instance, we cannot increase it to the fixed length of the longest item in the list (in this case, Minor Pentatonic). I'm not sure if changing size as per item selected is a good idea, since scrolling over one will then have an ugly effect.

Monospace-V avatar Jan 17 '23 11:01 Monospace-V

I tried with some new width values to get the attached images.

Length of Old New in PianoRoll.cpp
Quantization 64 85 https://github.com/LMMS/lmms/blob/507fa239ddffd2ed1f186d0a51016c85d9c2b5a9/src/gui/editors/PianoRoll.cpp#L4902
Note Length 105 105 https://github.com/LMMS/lmms/blob/507fa239ddffd2ed1f186d0a51016c85d9c2b5a9/src/gui/editors/PianoRoll.cpp#L4911
Key 72 72 https://github.com/LMMS/lmms/blob/507fa239ddffd2ed1f186d0a51016c85d9c2b5a9/src/gui/editors/PianoRoll.cpp#L4917
Scale 105 155 https://github.com/LMMS/lmms/blob/507fa239ddffd2ed1f186d0a51016c85d9c2b5a9/src/gui/editors/PianoRoll.cpp#L4926
Chord 105 125 https://github.com/LMMS/lmms/blob/507fa239ddffd2ed1f186d0a51016c85d9c2b5a9/src/gui/editors/PianoRoll.cpp#L4935
Snap Mode 105 96 https://github.com/LMMS/lmms/blob/507fa239ddffd2ed1f186d0a51016c85d9c2b5a9/src/gui/editors/PianoRoll.cpp#L4944

Defaults (max lengths selected): image

And, image

anytizer avatar Feb 12 '23 23:02 anytizer

Again, setting a fixed length may not work. The user can add their own scales, can they not? These can be of any length. Perhaps would be better to show full word on hover?

Monospace-V avatar Feb 14 '23 04:02 Monospace-V

Again, setting a fixed length may not work. The user can add their own scales, can they not?

Is there a way to add your own scales without editing the source code? I don't know, but that doesn't mean we can't tweak the default values and the ones suggested above look better than before. The scale names aren't translated so that's what it will look like right there.

zonkmachine avatar Apr 15 '24 18:04 zonkmachine

Is there a way to add your own scales without editing the source code?

No, but I did throw out a PR with a way to define some. It needs some much better work though, and proper integration into lmms rather than an external file.

Veratil avatar Apr 15 '24 18:04 Veratil

@anytizer if you are still around, would you consider opening a PR? Or if you can't, I'll open on your behalf.

Rossmaxx avatar Apr 24 '24 08:04 Rossmaxx

Again, setting a fixed length may not work. The user can add their own scales, can they not? These can be of any length. Perhaps would be better to show full word on hover?

IMO the solution is to get rid of the custom LMMS combo boxes in most contexts and to use styled QComboBox instances instead. QComboBox already knows how to "behave" in most situations while the LMMS combo box does not.

Most of the combo boxes shown above can also be automated which does not make any sense either.

michaelgregorius avatar Apr 24 '24 19:04 michaelgregorius

@Rossmaxx These numbers (widths of combo boxes) were intended for 1k resolution screen. Other sizes may cause us to vary those widths. Yes, I would suggest, at least let us change these values for now to make the default appearance better.

Regarding automations, and changes to new combo box instances, can we still do that after correcting the existing values? We might also need a way to reject automations in these dropdowns. @michaelgregorius.

anytizer avatar Apr 29 '24 02:04 anytizer

@Rossmaxx These numbers (widths of combo boxes) were intended for 1k resolution screen. Other sizes may cause us to vary those widths. Yes, I would suggest, at least let us change these values for now to make the default appearance better.

Starting with pull request https://github.com/LMMS/lmms/pull/7185 the combo boxes use pixel sized fonts again. Therefore the corrections should also look identical on other screen sizes, assuming that global scaling is used by the users.

Regarding automations, and changes to new combo box instances, can we still do that after correcting the existing values? We might also need a way to reject automations in these dropdowns. @michaelgregorius.

Sure, this can also be done later. I guess one approach would be to implement something like an LmmsComboBox (or however it should be called) which inherits from QComboBox and that knows how to deal with instances of ComboBoxModel. This combo box would simply not implement any automation abilities (or alternatively make them optional/configurable).

michaelgregorius avatar Apr 29 '24 14:04 michaelgregorius

Yes, I would suggest, at least let us change these values for now to make the default appearance better.

@anytizer Can you open a PR with the suggested changes?

zonkmachine avatar May 16 '24 17:05 zonkmachine

I have a branch called "LmmsComboBox" that introduces a combo box that inherits from QComboBox and that knows how to deal with ComboBoxModel. It can be found here: https://github.com/michaelgregorius/lmms/tree/LmmsComboBox.

For more infos and screenshots see here: https://github.com/LMMS/lmms/issues/7215#issuecomment-2104837733

michaelgregorius avatar May 16 '24 17:05 michaelgregorius

@zonkmachine I have sent a pr to @michaelgregorius 's branch for a test, before affecting the gui in master.

anytizer avatar May 17 '24 05:05 anytizer

@anytizer, it would be better to issue a pull request against the main repository. The "LmmsComboBox" branch is for a new implementation of the combo box which might behave differently than the current one.

michaelgregorius avatar May 17 '24 17:05 michaelgregorius