Bug 385031 - Menu can become wider when shortcut changes because it is calculated by "width of longest visible shortcut", not "width of longest possible shortcut"
Summary: Menu can become wider when shortcut changes because it is calculated by "widt...
Status: RESOLVED NOT A BUG
Alias: None
Product: Breeze
Classification: Plasma
Component: QStyle (show other bugs)
Version: 5.17.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-24 20:39 UTC by Patrick Silva
Modified: 2022-07-11 21:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
demonstration (267.85 KB, image/gif)
2017-09-26 14:51 UTC, Patrick Silva
Details
plasma 5.14.3 on Arch Linux (816.00 KB, video/webm)
2018-11-06 20:56 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2017-09-24 20:39:39 UTC
neon dev unstable here...
right click on any file/folder, press shift key... menu size increases some pixels.
Comment 1 Elvis Angelaccio 2017-09-24 20:44:08 UTC
Which size? Width or height?
Comment 2 Patrick Silva 2017-09-24 21:54:53 UTC
Width.
Comment 3 Elvis Angelaccio 2017-09-26 13:27:24 UTC
Hmm it could be an issue with the localized entries. What's your system language?
Comment 4 Patrick Silva 2017-09-26 13:50:35 UTC
(In reply to Elvis Angelaccio from comment #3)
>  What's your system language?

brazilian portuguese.
Comment 5 Elvis Angelaccio 2017-09-26 14:10:55 UTC
I can't reproduce with brazilian portuguese as language. After pressing Shift, "Mover para a Lixeira" becomes "Apagar". The menu width doesn't increase since there is plent of space for "Apagar".

Can you attach a screenshot maybe?
Comment 6 Patrick Silva 2017-09-26 14:51:46 UTC
Created attachment 108038 [details]
demonstration

See my gif.
Comment 7 Elvis Angelaccio 2017-09-26 15:03:49 UTC
Ah, I see it now. It seems it only happens when right-clicking a folder.
Comment 8 Patrick Silva 2017-09-26 15:09:41 UTC
On my system it happens when right-clicking a file too.
Comment 9 Elvis Angelaccio 2017-09-26 15:39:55 UTC
Very weird, now I can't reproduce it anymore...
Comment 10 Patrick Silva 2018-01-06 10:22:46 UTC
this bug is still reproducible on neon dev unstable running on my laptop, but it disappeared from Arch running dolphin 17.12 on my desktop computer after I replaced my old 17 inches monitor with a 23 inches monitor.
Comment 11 Christoph Feck 2018-01-17 18:01:00 UTC
I no longer get any shortcuts displayed in popup menus. Qt 5.10 regression?
Comment 12 Elvis Angelaccio 2018-01-20 17:34:58 UTC
(In reply to Christoph Feck from comment #11)
> I no longer get any shortcuts displayed in popup menus. Qt 5.10 regression?

Seems to work here with 5.10
Comment 13 Christoph Feck 2018-02-14 15:49:00 UTC
Caused by the 'Do not show icons in menus' setting. Probably a Qt regression around the new feature to disable shortcuts in context menus.
Comment 14 Nate Graham 2018-02-14 17:19:16 UTC
I see the issue now.

The menu width is determined by "width of padding" + "width of icons" + "width of longest visible menu item name" + "width of longest visible shortcut"

When you press shift in this menu,, one of the shortcuts changes from "Delete" to "Shift+Delete". This makes the "width of longest shortcut" longer, which requires resizing the menu to make room. Perhaps what we need to do here is to:

replace "width of longest visible shortcut"
with "width of longest possible shortcut"
Comment 15 Nate Graham 2018-03-29 21:22:03 UTC
Moving to Breeze, which controls how menus are rendered.
Comment 16 Patrick Silva 2018-11-06 20:56:04 UTC
Created attachment 116133 [details]
plasma 5.14.3 on Arch Linux

After update to plasma 5.14.3 on Arch Linux, context menu of icons on desktop is also affected.
Comment 17 Patrick Silva 2019-08-06 20:41:08 UTC
Still reproducible on neon unstable edition with Dolphin 19.11.70 when its language is pt-br.
I can't reproduce with english language.

I also can reproduce (with both english and pt-br languages) by right-clicking a folder on desktop.

Operating System: Ubuntu 18.04.3 LTS (Bionic Beaver)
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.61.0
Qt Version: 5.12.3
Comment 18 Patrick Silva 2020-01-17 17:49:23 UTC
reproducible if system language is pt-br

Operating System: Arch Linux 
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.0
Comment 19 Janet Blackquill 2022-07-11 21:52:46 UTC
I'm not really sure this can be considered a bug; items resizing whenever the size of their content changes is to be expected; making them wider by default will still require shifting around if a shortcut is that big, and will probably yield complaints from people about wide menus with a lot of blank space. And this doesn't really pose any usability issues, soooo...