Xfce Wiki

Sub domains
 
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Last revision
design:xfwm4:tabwin:default_theming [2013/12/11 11:20] – created ochosi
Line 1: Line 1:
 += 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.
 +Xfce default theme:
 +{{:design:xfwm4:tabwin:selected_active_xfce.png}}
 +Ambiance theme:
 +{{:design:xfwm4:tabwin:selected_active_ambiance.png}}
 +Adwaita theme:
 +{{:design:xfwm4:tabwin:selected_active_adwaita.png}}