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 685804 - Should be able to specify a different color for active tab labels
Should be able to specify a different color for active tab labels
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-10-09 12:15 UTC by tim hall
Modified: 2014-01-24 22:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check out the 'Interactive DnD Mode' tab (539.04 KB, image/png)
2012-10-09 12:15 UTC, tim hall
Details

Description tim hall 2012-10-09 12:15:25 UTC
Created attachment 226114 [details]
Check out the 'Interactive DnD Mode' tab

I expect the foreground 'color' to change to :active when I click on a new tab. The background style changes but the foreground remains the same.

Set up:
---
.notebook tab {
        background-image: -gtk-gradient (linear,
                0 0, 0 1,
                color-stop(0, shade(#aaa, 0.6)),
                color-stop(0.1, alpha(mix(#aaa, #fff, 0.7), 0.1)),
                color-stop(0.4, mix(#000, @transparent, 0.7)),
                color-stop(0.9, @transparent));
        border-color: alpha (mix (@bg_color, #777, 0.3), 0.4);
        padding: 2px;
        color: shade (@theme_fg_color, 0.5);
}
 
.notebook tab:active {
        background-image: -gtk-gradient (linear,
                0 0, 0 1,
                color-stop(0, shade(#ccc, 0.6)),
                color-stop(0.1, alpha(mix(#ccc, #fff, 0.7), 0.4)),
                color-stop(0.4, mix(#ccc, @transparent, 0.8)),
                color-stop(0.9, @transparent));
        border-color: alpha (mix (shade (@bg_color, 1.4), #777, 0.5), 0.3);
        color: @theme_fg_color;
}
---

Results:
see attachment - the Code Demos window shows the initial state and the Tool Palette window demonstrates the problem.
Comment 1 Cosimo Cecchi 2012-10-09 12:40:48 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 672046 ***
Comment 2 Lapo Calamandrei 2012-10-09 13:28:43 UTC
Cosimo, the bug you're duping it's fixed in master, but the specific problem persists, text color in active tabs still doesn't change, may be it's a gtknotebook issue then?
Comment 3 Cosimo Cecchi 2012-10-09 18:26:37 UTC
I understand the bug now - it's a consequence of [1]. The problem is that reverting that commit will cause e.g. a spinner on an active tab to always spin, or a button inside a tab appear to be pressed when you make such tab active.

This is due to the way we construct the GtkWidgetPath and style information for GtkNotebook tabs, and unfortunately can't be done in 3.6.
We are aware of this bug and Benjamin plans to fix it when the "actor" concept lands in GTK - we are currently targeting 3.8 for that.

[1] http://git.gnome.org/browse/gtk+/commit/gtk/gtknotebook.c?id=70cf23a72956ec49c10867724b249bdcdee98d4f
Comment 4 William Jon McCann 2014-01-24 22:02:08 UTC
The workaround for this in master is to use the "active-page" style class.