Xfce Wiki

Sub domains
 

Tabwin default theming

The tabwin uses GtkButtons by default, so if there is no tabwin-specific code in the theme, the widgets will look like buttons by default.

The problem: we have 4 different states – what GTK_STATE to use for what?

Not selected Keyboard-selection Mouse-hover Mouse-hover + Keyboard-selection

Generally speaking, GtkButtons only have three states (not counting insensitive, as it'd look weird and unexpected if used for a normal state): NORMAL, ACTIVE, PRELIGHT.

Option 1:

Not selected Keyboard-selection Mouse-hover Mouse-hover + Keyboard-selection
GTK_STATE_NORMAL GTK_STATE_SELECTED GTK_STATE_PRELIGHT GTK_STATE_ACTIVE

Pro: Looks more like the current tabwin. The selected-bg-color is usually used for GTK_STATE_SELECTED, so the currently selected window is very clearly visible.

Con: Breaks with some themes, because GTK_SELECTED is not a state a button can normally be in, so themes don't have support for it. This is especially bad with pixmap themes, as theming breaks entirely with those (see Adwaita in the screenshots below).

Option 2:

Not selected Keyboard-selection Mouse-hover Mouse-hover + Keyboard-selection
GTK_STATE_NORMAL GTK_STATE_ACTIVE GTK_STATE_PRELIGHT GTK_STATE_ACTIVE

Pro: Rock solid, works with every theme.

Con: Current selection isn't as obvious, no diff between keyboard-selection and mouse-hover+keyboard-selection.

Screenshots

These screenshots show Option 1 above Option 2. (Note: currently two screenshots show slightly broken theming. Ambiance Option 2 doesn't apply button-theming, which would add ythickness=3 and hence break the label. This has to be fixed in the tabwin though. The second is Adwaita, which is pixmap based and doesn't have a default style for selected buttons, hence the default Gtk look.)

Xfce default theme:

Ambiance theme:

Adwaita theme: