GNOME Bugzilla – Bug 704792
win32 : gtk-win32-base.css : no blue background on hover for the GtkTreeView of the GtkEntryCompletion
Last modified: 2018-04-15 00:20:19 UTC
Under Windows XP, when I use the GtkEntryCompletion, the background of the row (of the treeview's which show matches) under my cursor is grey with white characters but it should be blue with black characters. I took a look onto gtk-win32-base.css and gtk-default.css but I didn't find how to write the few missing lines in gtk-win32-xp.css. I think it should be something like this : XXXXXX:hover { background-color: @selected_bg_color; color: @selected_fg_color; } Does someone could help me with the XXXXXX ? Thinks,
My mistake, this problem is for all Windows version, not only Windows XP.
I've done some research. I do not found how to select only the GtkTreeView of the GtkEntryCompletion but I add this to the gtk-win32-base.css : GtkTreeView:hover { background-color: @selected_bg_color; color: @selected_fg_color; } This work for all GtkTreeView but not for the only build by GtkEntryCompletion. I had to remove the following line : gtk_tree_view_set_hover_selection (GTK_TREE_VIEW (priv->tree_view), TRUE); from the function "gtk_entry_completion_constructor" inside gtkentrycompletion.c to make it work. It's like when hover-selection is set, the GtkTreeView don't takes care of css. What do you think about it ? It's it right that the GtkTreeView allows highlight when hover if css says so and hover-selection is FALSE ? Why GtkTreeView don't takes care of css when hover-selection is TRUE ?
Created attachment 251308 [details] [review] patch for changing color on hover for GtkEntryCompletion I finally solve my problem with the enclosed patch. It's not really a beautiful hack but that do the trick.
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new