mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-09 23:40:18 +00:00
userlist highlight: focusable treeview + palette CSS gets real :selected theme colors
This commit is contained in:
@@ -531,6 +531,12 @@ gtkutil_apply_palette (GtkWidget *widget, const GdkRGBA *bg, const GdkRGBA *fg,
|
||||
}
|
||||
gtkutil_append_font_css (css, font_desc);
|
||||
g_string_append (css, " }");
|
||||
g_string_append_printf (css, ".%s *:selected {", class_name);
|
||||
if (bg)
|
||||
g_string_append (css, " background-color: @theme_selected_bg_color;");
|
||||
if (fg)
|
||||
g_string_append (css, " color: @theme_selected_fg_color;");
|
||||
g_string_append (css, " }");
|
||||
|
||||
gtk_css_provider_load_from_data (provider, css->str, -1, NULL);
|
||||
if (new_provider)
|
||||
|
||||
@@ -682,6 +682,7 @@ userlist_create (GtkWidget *box)
|
||||
|
||||
treeview = gtk_tree_view_new ();
|
||||
gtk_widget_set_name (treeview, "zoitechat-userlist");
|
||||
gtk_widget_set_can_focus (treeview, TRUE);
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE);
|
||||
gtk_tree_selection_set_mode (gtk_tree_view_get_selection
|
||||
(GTK_TREE_VIEW (treeview)),
|
||||
|
||||
Reference in New Issue
Block a user