GNOME Bugzilla – Bug 664411
Notification buttons have too much padding
Last modified: 2013-04-08 17:29:54 UTC
As subject says, the padding of notification buttons causes the labels to be truncated most of time, making them completely useless.
Created attachment 201733 [details] Example 1, liferea. Buttons should read "Mostra dettagli", "Apri notiziario" and "Segna tutto come letto".
Created attachment 201736 [details] Example 2, deja-dup Buttons should read "Mostra avanzamento", "Riprendi in seguito", "Salta backup". (and I had to fiddle with lg to find out for sure...)
Does this happen with any other apps, or is it just deja dup? Also, an English translation would help me know what's going on here. :)
nm, this is obviously a bug. Seems easy to fix if we support setting widths in the css. I can't figure out a way to test though. Any idea how you can trigger one of these notifications that have buttons?
libnotify has a couple of tests with actions (== buttons).
Created attachment 230197 [details] [review] patch Here's a simple fix. It works with buttons that have short labels. I haven't tested it with any that have long ones though. .hotplug-notification-item:focus also uses huge button padding (why only focused?) but I couldn't find a way to test it, since I can't find a way to focus notification buttons. So I left it alone.
(In reply to comment #6) Actually, that seems broken - the buttons end up hanging off the side of the notification. The way the buttons are sized seems kinda weird. I would have expected a box model.
(In reply to comment #6) > I couldn't find a way to test it, since I can't find a way to > focus notification buttons. You can hit <super>n while the notification is in banner mode.
*** Bug 687524 has been marked as a duplicate of this bug. ***
(In reply to comment #7) > (In reply to comment #6) > > Actually, that seems broken - the buttons end up hanging off the side of the > notification. > > The way the buttons are sized seems kinda weird. I would have expected a box > model. It is a standard box layout, but you're overriding it by setting width explicitly. We need a new CSS property to set the natural width of a box without touching the minimum width.
Created attachment 230291 [details] [review] St: support -st-natural-width/height CSS properties It is sometimes desirable to specify the size of a box from CSS without changing the minimum-width too. This property implements that.
Created attachment 230292 [details] [review] theme: remove excessive padding from notification buttons Set the button width manually and remove the huge horizontal padding we had. This means that long button labels don't get cut off. Same patch, but with -st-natural-width in place of width. Enforces big buttons if you have one or two, but shrinks them if you have more.
Created attachment 230297 [details] [review] St: support -st-natural-width/height CSS properties It is sometimes desirable to specify the size of a box from CSS without changing the minimum-width too. This property implements that. Oops, previous patch broke max-width...
*** Bug 690687 has been marked as a duplicate of this bug. ***
One month review ping! This is an EDM bug.
I guess I'm confused why this can't be done with just min-width.
(In reply to comment #16) > I guess I'm confused why this can't be done with just min-width. min-width needs to be 0px (ie computed from content), because you want to shrink buttons when there are too many of them
(In reply to comment #17) > (In reply to comment #16) > > I guess I'm confused why this can't be done with just min-width. > > min-width needs to be 0px (ie computed from content), because you want to > shrink buttons when there are too many of them I guess I don't understand the behavior we want, then. Do we want to keep the homogenous button sizes or not?
What I want is to have all buttons homogeneous, but: - to shrink them if they don't fit at natural width - to enlarge them if the contents doesn't fit fully
*** Bug 696307 has been marked as a duplicate of this bug. ***
Note that the new Frequent button that was introduced in 3.8 suffers quite badly from this bug (see bug 696307).
In GtkButtonBox, I added code that keeps buttons homogeneous, but allows for 'outliers'.
Review of attachment 230297 [details] [review]: OK, I've thought about this for a while, and this is the correct way to go.
Review of attachment 230292 [details] [review]: OK.
Attachment 230292 [details] pushed as e14ef4a - theme: remove excessive padding from notification buttons Attachment 230297 [details] pushed as 8b659f0 - St: support -st-natural-width/height CSS properties