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 708144 - Tab close button styling is broken in master
Tab close button styling is broken in master
Status: RESOLVED FIXED
Product: gnome-themes-standard
Classification: Core
Component: Adwaita GTK3 theme
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-themes-standard-maint
gnome-themes-standard-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-16 09:23 UTC by Alexander Larsson
Modified: 2013-09-16 18:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix notebook tab close buttons with new Gtk+ (2.14 KB, patch)
2013-09-16 13:18 UTC, Alexander Larsson
committed Details | Review

Description Alexander Larsson 2013-09-16 09:23:02 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?
Comment 1 Alexander Larsson 2013-09-16 13:18:10 UTC
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.
Comment 2 Alexander Larsson 2013-09-16 13:27:00 UTC
Attachment 255022 [details] pushed as 1ea3a54 - Fix notebook tab close buttons with new Gtk+
Comment 3 Cosimo Cecchi 2013-09-16 16:38:49 UTC
Alex: note that the underlying bug is https://bugzilla.gnome.org/show_bug.cgi?id=705590
Comment 4 Alexander Larsson 2013-09-16 18:38:48 UTC
Cosimo: I believe the above fix makes it work as intented though. Right?
Comment 5 Cosimo Cecchi 2013-09-16 18:46:47 UTC
It should - haven't tested yet. I just wanted to point out there is actually a problem in how regions interact with state propagation.
Comment 6 Alexander Larsson 2013-09-16 18:54:00 UTC
Solution: Kill regions :)