GNOME Bugzilla – Bug 685804
Should be able to specify a different color for active tab labels
Last modified: 2014-01-24 22:02:08 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.
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 ***
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?
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
The workaround for this in master is to use the "active-page" style class.