After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 499983 - cropped close button icons with gnome-icon-theme [svn]
cropped close button icons with gnome-icon-theme [svn]
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Tabs
unspecified
Other All
: High critical
: gnome-2-22
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-27 14:36 UTC by Jakub 'Livio' Rusinek
Modified: 2008-01-14 21:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
cutted close buttons (199.85 KB, image/png)
2007-11-27 14:40 UTC, Jakub 'Livio' Rusinek
  Details
proposed fix (1.86 KB, patch)
2007-11-27 15:52 UTC, Cosimo Cecchi
committed Details | Review
hovered button screenshot (36.88 KB, image/png)
2007-12-07 21:26 UTC, Jakub 'Livio' Rusinek
  Details
screenshot of the fix (27.65 KB, image/png)
2007-12-08 09:18 UTC, Cosimo Cecchi
  Details
screenshot (92.04 KB, image/png)
2008-01-14 21:11 UTC, Cosimo Cecchi
  Details

Description Jakub 'Livio' Rusinek 2007-11-27 14:36:58 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
Comment 1 Jakub 'Livio' Rusinek 2007-11-27 14:40:03 UTC
Created attachment 99717 [details]
cutted close buttons

midori has nice tabs
Comment 2 Cosimo Cecchi 2007-11-27 15:52:56 UTC
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.
Comment 3 Jakub 'Livio' Rusinek 2007-11-27 16:05:31 UTC
waiting for tabs with higher height - they're more user friendly, i think.
especially in web browser.
Comment 4 Christian Persch 2007-11-27 17:37:42 UTC
Bug 116650 has nothing to do with epiphany, since it's talking about a ff2.0-style single close button, not per-tab ones.
Comment 5 Cosimo Cecchi 2007-11-27 17:54:25 UTC
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?
Comment 6 Christian Persch 2007-11-27 18:39:42 UTC
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 ?
Comment 7 Cosimo Cecchi 2007-11-27 18:50:56 UTC
CC-ing Rodney so that he may answer himself on this.
Comment 8 Rodney Dawes 2007-11-27 20:15:16 UTC
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.
Comment 9 Rodney Dawes 2007-11-28 16:32:31 UTC
Grammar in subject.
Comment 10 Jakub 'Livio' Rusinek 2007-11-28 16:36:05 UTC
Forgive me, I'm a Pole :> .
Comment 11 Christian Persch 2007-12-07 21:07:09 UTC
Does the button look correct when hovered over, with all that padding etc. missing? Could you do a screeenshot of that?
Comment 12 Jakub 'Livio' Rusinek 2007-12-07 21:26:12 UTC
Created attachment 100554 [details]
hovered button screenshot
Comment 13 Cosimo Cecchi 2007-12-08 09:18:42 UTC
Created attachment 100575 [details]
screenshot of the fix

This is how the button appears with the patch applied.
Comment 14 Jakub 'Livio' Rusinek 2007-12-08 11:39:25 UTC
Love it :) .
Comment 15 Christian Persch 2007-12-24 18:47:40 UTC
+                            "  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.

Comment 16 Rodney Dawes 2007-12-24 21:28:54 UTC
(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.
Comment 17 Cosimo Cecchi 2008-01-10 10:39:07 UTC
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?
Comment 18 Christian Persch 2008-01-14 00:36:47 UTC
+			     "  GtkWidget::focus-padding = 0\n"

Put the indent _outside_ of the string.
Comment 19 Cosimo Cecchi 2008-01-14 20:51:08 UTC
Committed to trunk. I'm closing this as FIXED.
Comment 20 Cosimo Cecchi 2008-01-14 20:51:49 UTC
------------------------------------------------------------------------
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.
Comment 21 Jakub 'Livio' Rusinek 2008-01-14 20:57:43 UTC
Can you give me the screenshot?
Compiling Epiphany from SVN is a little bit complicated.
Comment 22 Cosimo Cecchi 2008-01-14 21:11:16 UTC
Created attachment 102854 [details]
screenshot

Here it is.
Comment 23 Jakub 'Livio' Rusinek 2008-01-14 21:49:11 UTC
Looks perfect. Thanks :) .