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 691163 - GtkNotebook unable to style active tab
GtkNotebook unable to style active tab
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 707920
 
 
Reported: 2013-01-05 01:06 UTC by Morten Welinder
Modified: 2013-09-27 03:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow active tab children to be styled (1.63 KB, patch)
2013-08-05 09:27 UTC, William Jon McCann
accepted-commit_now Details | Review

Description Morten Welinder 2013-01-05 01:06:03 UTC
I am having trouble seeing what gtknotebook tab is active, so I came up
with some css that ought to do the trick, but does not.

Basically, I want the active tab to be bold.

/* Has a visible effect.  "lighter" doesn't parse.  */
GtkNotebook tab GtkLabel {
  font-weight: 100;
}

/* This works for color; font of sub-widget not bold.  */
GtkNotebook tab:active {
  background-color: #00dd00;
  font-weight: bold;
}

/* This seems to have no effect. */
GtkNotebook tab:active GtkLabel {
  background-color: #0000dd;
  font-weight: Bold;
}
Comment 1 William Jon McCann 2013-08-05 09:27:22 UTC
Created attachment 250841 [details] [review]
Allow active tab children to be styled

This allows one to style the children of an active
tab label from CSS.
Comment 2 Cosimo Cecchi 2013-08-05 11:33:24 UTC
Review of attachment 250841 [details] [review]:

This is basically working around the fact that we can't have a separate style context for each tab element, and so we use regions, which don't support propagating the style to children. I think this is a fine compromise until we have GtkActors.
Comment 3 Matthias Clasen 2013-09-26 22:12:22 UTC
Review of attachment 250841 [details] [review]:

ok