GNOME Bugzilla – Bug 735368
try to tidy up the TextView background rendering
Last modified: 2014-08-26 07:58:49 UTC
The margins (eg gedit's line numbers) used to be rendered with a grey background, because they used to be just rendered with the default widget color, while the actual text part used the "base" color, which is white by default. Things got mixed up over time, with the ".view" class also applied to the main widget window and with the margins using code to fetch the color from the style context and then setting it explicitly on on the GdkWindow The attached patch tries to address it, and with the patch gedit's line numbers are back to what they used to be. However once I create a new tab they go back to be white... my suspicion is that now margins are simply drawn "transparent" and for some reason we end up with "white" showing through. If in the inspector I explicitly do: GtkTextView { background: grey; } GtkTextView.view { background: white; } then things seems to be fine, but I am not sure if this should be fixed by fixing the theme or if there is some other bug
Created attachment 284388 [details] [review] patch
Review of attachment 284388 [details] [review]: The patch looks good to me.
pushed with a little more cleanup. The remaining problem with line numbers in gedit is due to gtknotebook: 1) adwaita sets the notebook bg to base_bg_color instead of bg_color which sounds wrong to me 2) notebook paints the bg only if there is more than a tab which is definitely wrong