Kicker: Make menus grow (to a limit) if the text doesn't fit on the default width
ClosedPublic

Authored by aacid on Apr 13 2018, 10:19 AM.

Details

Summary

On my install i have various application names that don't fit on units.gridUnit * 14
so let the list grow if needed. It only grows to a limit, we don't want the list to
be huge for some weirdly long application name.

Test Plan

Use the menu editor to rename Development to Development 22222222222222222222222222
Check the root menu shows all the name
Search and check the search bar sizing is correct at all times
Open submenus with applications whose name previously was cut and check now it displays correctly

Note: I get
TextFieldStyle.qml:46:17: QML QQuickItem: Binding loop detected for property "implicitHeight"
when entering text on the search bar, but i can also reproduce this with a simple testcase like
https://paste.kde.org/pi1hopivh so it seems it's not a bug in my code. Also i can't see the search
bar misbehaving so it seems to be "harmless"

Diff Detail

Repository
R119 Plasma Desktop
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
aacid created this revision.Apr 13 2018, 10:19 AM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 13 2018, 10:19 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
aacid requested review of this revision.Apr 13 2018, 10:19 AM

This is how it looks now

This is how it looked before

Notice how quite critical information is missing from the cut text in the old screenshot

hein added a comment.Apr 18 2018, 2:50 PM

Personally I sort of, well, hate this and it was a very conscious design decision to make the menu widths uniform, so I'd like some more VDG opinions to convince me otherwise first.

Personally I sort of, well, hate this and it was a very conscious design decision to make the menu widths uniform, so I'd like some more VDG opinions to convince me otherwise first.

Worth noting that they only expand *if* they go above the current size which hasn't changed, so for me and most people after this patch it'll look exactly the same as it does now.

aacid added a comment.Apr 18 2018, 8:13 PM
In D12171#248840, @hein wrote:

Personally I sort of, well, hate this and it was a very conscious design decision to make the menu widths uniform, so I'd like some more VDG opinions to convince me otherwise first.

Andy said +1 5 days ago.

BTW have you tried it? It tries very hard not to change the menu width at all, so as David says most probably you won't even notice it.

From localization perspective, this seems important given that some languages generally yield longer strings than others (we get a lot of Bugzilla tickets on this). Also, romance languages tend to put the differentiating part of the string on the end rather than the beginning.

From a usability perspective, showing all the text (within reason) seems more important than rigidly sticking to a single preferred size. Function > form (within reason, again).

So +1 from me.

What I don't like is that the menus in the different hierarchy levels can have a different size now. To have them in an uniform size gives them a more consistent look.

Change all the menus, in all hierarchy levels, to the same dynamic size?

hein accepted this revision.Apr 20 2018, 5:57 PM

Alrighty.

This revision is now accepted and ready to land.Apr 20 2018, 5:57 PM
This revision was automatically updated to reflect the committed changes.