gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
gtk_tree_selection_set_select_function(selection, tree_selection_func, NULL, NULL);
- VB_WIDGET_OVERRIDE_COLOR(comp.tree, GTK_STATE_NORMAL, &vb.style.comp_fg[VB_COMP_NORMAL]);
- VB_WIDGET_OVERRIDE_TEXT(comp.tree, GTK_STATE_NORMAL, &vb.style.comp_fg[VB_COMP_NORMAL]);
- VB_WIDGET_OVERRIDE_BASE(comp.tree, GTK_STATE_NORMAL, &vb.style.comp_bg[VB_COMP_NORMAL]);
- VB_WIDGET_OVERRIDE_BACKGROUND(comp.tree, GTK_STATE_NORMAL, &vb.style.comp_bg[VB_COMP_NORMAL]);
-
- VB_WIDGET_OVERRIDE_COLOR(comp.tree, GTK_STATE_ACTIVE, &vb.style.comp_fg[VB_COMP_ACTIVE]);
- VB_WIDGET_OVERRIDE_TEXT(comp.tree, GTK_STATE_ACTIVE, &vb.style.comp_fg[VB_COMP_ACTIVE]);
- VB_WIDGET_OVERRIDE_BASE(comp.tree, GTK_STATE_ACTIVE, &vb.style.comp_bg[VB_COMP_ACTIVE]);
- VB_WIDGET_OVERRIDE_BACKGROUND(comp.tree, GTK_STATE_ACTIVE, &vb.style.comp_bg[VB_COMP_ACTIVE]);
+ VB_WIDGET_OVERRIDE_TEXT(comp.tree, VB_GTK_STATE_NORMAL, &vb.style.comp_fg[VB_COMP_NORMAL]);
+ VB_WIDGET_OVERRIDE_BASE(comp.tree, VB_GTK_STATE_NORMAL, &vb.style.comp_bg[VB_COMP_NORMAL]);
+ VB_WIDGET_OVERRIDE_TEXT(comp.tree, VB_GTK_STATE_SELECTED, &vb.style.comp_fg[VB_COMP_ACTIVE]);
+ VB_WIDGET_OVERRIDE_BASE(comp.tree, VB_GTK_STATE_SELECTED, &vb.style.comp_bg[VB_COMP_ACTIVE]);
gtk_tree_view_insert_column_with_attributes(
GTK_TREE_VIEW(comp.tree), -1, "", renderer,
void vb_set_widget_font(GtkWidget *widget, const VbColor *fg, const VbColor *bg, PangoFontDescription *font)
{
VB_WIDGET_OVERRIDE_FONT(widget, font);
- VB_WIDGET_OVERRIDE_TEXT(widget, GTK_STATE_NORMAL, fg);
- VB_WIDGET_OVERRIDE_COLOR(widget, GTK_STATE_NORMAL, fg);
- VB_WIDGET_OVERRIDE_BASE(widget, GTK_STATE_NORMAL, bg);
- VB_WIDGET_OVERRIDE_BACKGROUND(widget, GTK_STATE_NORMAL, bg);
+ VB_WIDGET_OVERRIDE_TEXT(widget, VB_GTK_STATE_NORMAL, fg);
+ VB_WIDGET_OVERRIDE_COLOR(widget, VB_GTK_STATE_NORMAL, fg);
+ VB_WIDGET_OVERRIDE_BASE(widget, VB_GTK_STATE_NORMAL, bg);
+ VB_WIDGET_OVERRIDE_BACKGROUND(widget, VB_GTK_STATE_NORMAL, bg);
}
void vb_update_statusbar()
#define VB_GTK_STATE_NORMAL GTK_STATE_FLAG_NORMAL
#define VB_GTK_STATE_ACTIVE GTK_STATE_FLAG_ACTIVE
+#define VB_GTK_STATE_SELECTED GTK_STATE_FLAG_SELECTED
#define VB_WIDGET_SET_STATE(w, s) gtk_widget_set_state_flags(w, s, true)
#else
#define VB_GTK_STATE_NORMAL GTK_STATE_NORMAL
#define VB_GTK_STATE_ACTIVE GTK_STATE_ACTIVE
+#define VB_GTK_STATE_SELECTED GTK_STATE_SELECTED
#define VB_WIDGET_SET_STATE(w, s) gtk_widget_set_state(w, s)
#endif