GNOME Bugzilla – Bug 708144
Tab close button styling is broken in master
Last modified: 2013-09-16 18:54:00 UTC
The close button styling for e.g. nautilus tabs are currently broken. We get no special style on either :hover or :active. The current CSS for this is: /* close button styling */ .notebook tab .button, .notebook tab .button:active, .notebook tab .button:hover { border-image: none; border-style: none; background-image: none; background-color: transparent; } .notebook tab .button GtkImage { border-radius: 3px; color: mix(@theme_fg_color, @theme_base_color, 0.6); border-style: solid; border-color: transparent; border-width: 1px; padding: 1px; icon-shadow: 0 1px @button_text_shadow; } .notebook tab .button GtkImage:hover { color: @theme_fg_color; border-color: alpha(black, 0.1); } .notebook tab .button GtkImage:active, .notebook tab .button GtkImage:active:hover { background-color: alpha(black, 0.08); box-shadow: inset 0 1px alpha(black, 0.05); color: @button_active_text; icon-shadow: 0 1px @button_active_text_shadow; border-color: alpha(black, 0.27) alpha(black, 0.13) alpha(black, 0.13) alpha(black, 0.13); } .notebook tab .button GtkImage:backdrop { color: mix(@theme_unfocused_fg_color, @theme_unfocused_base_color, 0.7); icon-shadow: none; } .notebook tab .button GtkImage:backdrop:hover { color: @theme_unfocused_fg_color; } Where things like ".notebook tab .button GtkImage:hover" are not right in the new world where :hover doesn't propagate from the button to the child image. However, if i change this to .notebook tab .button:hover GtkImage { It doesn't seem to get applied. Isn't this right?
Created attachment 255022 [details] [review] Fix notebook tab close buttons with new Gtk+ Gtk+ no longer propagates :hover state to child widgets, so we can't do something like ".button GtkImage:hover". Fortunately the stuff the code was using is all inherited properties that we may as well set on the button itself instead.
Attachment 255022 [details] pushed as 1ea3a54 - Fix notebook tab close buttons with new Gtk+
Alex: note that the underlying bug is https://bugzilla.gnome.org/show_bug.cgi?id=705590
Cosimo: I believe the above fix makes it work as intented though. Right?
It should - haven't tested yet. I just wanted to point out there is actually a problem in how regions interact with state propagation.
Solution: Kill regions :)