GNOME Bugzilla – Bug 499983
cropped close button icons with gnome-icon-theme [svn]
Last modified: 2008-01-14 21:49:11 UTC
Please describe the problem: close buttons are cutted. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information: i have attachment
Created attachment 99717 [details] cutted close buttons midori has nice tabs
Created attachment 99723 [details] [review] proposed fix You're right. After a talk with Rodney Dawes on IRC (gnome-icon-theme maintainer), we found out that Epiphany is not setting the right properties for the buttons on the tab label, and came up with this workaround, as suggested by Rodney. Proper solution would be solving bug #116650 to have proper close buttons for tabs, so I'm marking this bug as dependent on that. In the meantime, I think we should commit this fix until bug #116650 is solved.
waiting for tabs with higher height - they're more user friendly, i think. especially in web browser.
Bug 116650 has nothing to do with epiphany, since it's talking about a ff2.0-style single close button, not per-tab ones.
Christian, sorry for the spam then, I did not understand that bug properly. Should I file a new bug against GtkNotebook and/or commit this?
I don't like hardcoding that RC style into epiphany (and galeon, and gnome-terminal, and gedit, and whatever other programme uses tab close buttons)... Can't we come up with a common widget name ("tab-close-button") so we only need to set the widget name, and have the theme install that RC code ? Also, why is this bug occurring at all? The close buttons are fine here on 2.20; was it really necessary to change the image size in g-i-t svn ?
CC-ing Rodney so that he may answer himself on this.
It sounds like epiphany is requesting an icon size that is too large to fit in the button's renderable area. This has always been a problem. I don't think it is anything new. If you can't fit a 16x16 image in the button, don't request a 16x16 image. Expecting a gtk+ theme to set the rc style so that you can fit icons inside a button in your application, is not correct. Also, bug 116650 is relevant, as it is about a close button for GtkNotebooks, regardless of whether it is in the tab or not. While I don't think the patch itself is entirely appropriate, and sort of misses the point, I think the bug itself is relevant, as Epiphany uses notebooks, as do many other apps, which shove a close button in the tabs. It is obviously a general problem that needs to be solved at a lower level.
Grammar in subject.
Forgive me, I'm a Pole :> .
Does the button look correct when hovered over, with all that padding etc. missing? Could you do a screeenshot of that?
Created attachment 100554 [details] hovered button screenshot
Created attachment 100575 [details] screenshot of the fix This is how the button appears with the patch applied.
Love it :) .
+ " GtkWidget::focus-padding = 0\n" + " GtkWidget::focus-line-width = 0\n" + " xthickness = 0\n" + " ythickness = 0\n" Put the indentation outside of the string, not in the string. Also, the same issue will surely affect many other programmes: gedit, gnome-terminal, galeon, etc. Were bugs filed for them ? (In reply to comment #8) > It sounds like epiphany is requesting an icon size that is too large to fit in > the button's renderable area. This has always been a problem. I don't think it > is anything new. If you can't fit a 16x16 image in the button, don't request a > 16x16 image. Expecting a gtk+ theme to set the rc style so that you can fit > icons inside a button in your application, is not correct. You misunderstood me. Since epiphany isn't the only programme with this problem but it affects every programme which puts a close button in a notebook's tab label, I was suggesting that the theme defines a "close-button-in-tab-label" style that it applies to them, and any programme can get that theming simply by setting the agreed-upon widget name on its tab label's close button.
(In reply to comment #15) > You misunderstood me. Since epiphany isn't the only programme with this problem > but it affects every programme which puts a close button in a notebook's tab > label, I was suggesting that the theme defines a "close-button-in-tab-label" > style that it applies to them, and any programme can get that theming simply by > setting the agreed-upon widget name on its tab label's close button. Not at all. Because multiple programs may have the same problem, doesn't mean that we should create a workaround in the theme. It might be a nice blanket to make the buttons look nicer for now, but it doesn't really solve the bugs. Placing it in the gtk+ theme just means that if someone doesn't use the default theme (for GNOME), we're still going to end up with the same problems. Perhaps given that we're in the development cycle, and the code isn't frozen, we can fix this properly inside GTK+, or at least by writing a widget derived from GtkButton specifically for close buttons in tabs, that all the apps use, so that the code is synchronized between them. The problem is that the icon size requested is a specific pixel size, and not at all related to the actual container size it is meant to fit in, so cropping is a possibility. Perhaps another good solution would be to somehow set a minimum size for the container, so that the icon size is always guaranteed to be at least NxN pixels.
We should try to solve this issue (possibly in as most GNOME apps as possible or directly into g-i-t) before 2.22 IMHO. Before we start filing bugs and patches like this one for every app that use a notebook, really there's no way for this bug to be solved at a lower level?
+ " GtkWidget::focus-padding = 0\n" Put the indent _outside_ of the string.
Committed to trunk. I'm closing this as FIXED.
------------------------------------------------------------------------ r7865 | cosimoc | 2008-01-14 21:50:23 +0100 (lun, 14 gen 2008) | 3 lines Fix cropped close button on tab labels with gnome-icon-theme 2.21.x. Bug #499983.
Can you give me the screenshot? Compiling Epiphany from SVN is a little bit complicated.
Created attachment 102854 [details] screenshot Here it is.
Looks perfect. Thanks :) .