GNOME Bugzilla – Bug 736346
theme problem in sidebar
Last modified: 2018-03-26 12:42:31 UTC
The routing sidebar sometimes has white-on-light gray text. to reproduce, bring up the sidebar with a route, click on Start to select it, then click in the map to move the focus away.
Yeah, the text turns white when the row is selected and gets the blue box around it. The blue box turns gray when it loses focus and the text stays white. How do one fix this the best way? What is the desired result? Remove the selection when it loses focus maybe?
> How do one fix this the best way? What is the desired result? Remove the > selection when it loses focus maybe? If this is just plain listbox styling, then we should fix it in the theme. Removing the selection doesn't sound right to me.
doesn't seem to be though - other listbox selection I've tried stay blue when unfocused
#instruction-box > GtkImage { padding-right: 6px; padding-left: 6px; } #instruction-list .list-row { background-color: #f1f2f1; border-bottom: 1px solid #bbbeb7; } #instruction-list .list-row:hover { background-color: #f9f9f9; color: black; } #instruction-list .list-row:focused { background-color: @theme_selected_bg_color; color: @theme_selected_fg_color; } This is the css that I can see touch it in gnome-maps.css
Changing the .list-row:focused to list-row:selected seems to fix it. Fit it in that sense that it stays blue after focus.
Created attachment 285845 [details] [review] list-row: Do blue highlight on selected If we set the selected bg/fg on .list-row:focus we get white text on gray when the list-row loses focus.
I managed to figure it out using that GtkInspector tool, it's nifty.
if it is just a listbox, maybe you can get bye without any custom css ? why is it needed ?
Good question. I am no css wizard. Maybe Mattias or Dario can chime in? I think looks good without any custom css and it doesn't have the problems Matthias noticed here.
Created attachment 285850 [details] [review] instruction-box: Rely on standard css The custom css for listbox seems good enough and our custom one was creating some problems with white on gray text. §
The custom CSS is to make the result listbox look consistent with the contact listbox in Contacts. So it /is/ intentional. However comparing the two I see that they aren't looking exactly the same anyways. The preferred solution (from my POV) is to just copy how this works in Contacts and do the same in Maps, since that seems to work fine. Also, this issue manifests with the Dark theme as well (not that I care too much about that specifically, but it IS an indication that we're doing something wrong).
Created attachment 285880 [details] Comparison of Maps master and Contacts 3.13.91
If someone sends patches in time to do something like that we could do it. Otherwise I will commit the removal of custom css.
This seems to be fixed in version 3.22.2.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-maps/issues/15.