Buttons in notifications seem to use two hard-coded sizes. Unfortunately a couple of texts, even of plasma itself (see screenshot for an example), are wider than that and thus get cut off. It would be nice if either buttons would expand up to a certain size or at least remove characters and replace them with an ellipsis. (The former is preferred because in some cases, e.g. bluedevil receiving files, texts on buttons can start similarly and thus cutting the text off makes it harder or even impossible to know which button triggers which action) Reproducible: Always Steps to Reproduce: 1. Have an application trigger a notification with user actions 2. Make the text of that action a bit longer Actual Results: Text is cut off in an ugly way Expected Results: Text is either not cut off if possible, or at least in a nicer way Qt is 5.4.2, plasma is 5.4, frameworks is 5.13, apps is 15.08,
Created attachment 94335 [details] Screenshot of the issue
Thanks for the report. > Buttons in notifications seem to use two hard-coded sizes Not entirely, it depends on your font size... > ...are wider than that and thus get cut off. That's not entirely because of that size either, the layouting is a bit more complex. Plus the Button should elide the text it cannot fit on its own and it probably does, you just can't see it cause its painted outside. Can you tell me what font, font-size and DPI setting are you using? And which theme?
(In reply to Martin Klapetek from comment #2) > Thanks for the report. Thanks for looking into it > > Buttons in notifications seem to use two hard-coded sizes > > Not entirely, it depends on your font size... Then maybe something with font metrics is broken, in addition to what I'll write below, I also had another font size depending bug report (konversation has a "broken" topic and button height). Thanks for the hint. I assumed fixed with because that is what I found in the qml file when I temporarily "fixed" it for me by simply increasing one of the numbers. The one I used for testing / bug reporting now is the original file, though. > Can you tell me what font, font-size and DPI setting are you using? DPI are 96 at a resolution of 1600 x 900. Interestingly enough I can trigger the bug with some fonts (among them: Arial, which I use by default, but also Deja vu) while with Oxygen it indeed behaves correctly. Theme is breeze-dark, I just use a different icon set which might be confusing. Another interesting thing: when I change the font to Oxygen, plasmoids get considerably bigger, both in the panel (the systray icons basically become full height, which is a bit ugly) but also on the desktop (e.g. analogue clock, which I use for testing). As a sidenote: I'll have this very system in Randa next week, so if it would help to get hands on it instead of remote debugging: those of you who are there can gladly take a look and toy with it. (It's gentoo, mind. So installing software will take time, so tell me beforehand if you need anything) Kind regards, Christian
In Plasma, everything is sized depending on the width (or height?) of M, which is obviously different in different fonts, so that's why everything changes sizes when you switch fonts. Nevertheless, the button should behave correctly no matter the font. > I'll have this very system in Randa next week I won't be there but many other Plasma devs will (ooh btw are you the Fuchs who gave me the chocolate fuchs in Randa last year?)
I can reproduce using Arial and longlonglong action button label.
(In reply to Martin Klapetek from comment #4) > In Plasma, everything is sized depending on the width (or height?) of M, > which is obviously different in different fonts, so that's why everything > changes sizes when you switch fonts. Yes, I am just wondering if maybe it is broken in ... hmm, Qt or some other place, as plasma is not the only thing misbehaving. Hopefully you can reproduce it with the fonts named, Arial might be a bit tricky to get depending on distribution, Deja Vu should be trivial. If you need other font settings or information (e.g. antialising etc.), just let me know. > > I'll have this very system in Randa next week > > I won't be there but many other Plasma devs will (ooh btw are you the Fuchs > who gave me the chocolate fuchs in Randa last year?) Yes, shame, because I would bring chocolate again. I see with the other developers, if it actually helps to get hands on a system where it behaves as said (and they can't reproduce it on their own) I'll gladly hand it over. Kind regards, Christian
I think I know what's up. The buttons have defined minimumWidth, which is defined as Math.max(theme.mSize(theme.defaultFont).width*12, style.minimumWidth); ...while the notification button has the width defined as width: theme.mSize(theme.defaultFont).width * (compact ? 8 : 12) So if the Button style selects the min width as "style.minimumWidth", it won't fit the notification layout and the overflow will happen. I'll see what can we do about that.
Git commit 0d0b49f217ef8a632dc9ec09f3224787feb2a183 by David Rosca. Committed on 12/09/2015 at 20:38. Pushed by drosca into branch 'Plasma/5.4'. Don't overflow action buttons in notification Somehow the maximumWidth constraint is not propagated through the Repeater. REVIEW: 125200 M +1 -0 applets/notifications/package/contents/ui/NotificationItem.qml http://commits.kde.org/plasma-workspace/0d0b49f217ef8a632dc9ec09f3224787feb2a183