GNOME Bugzilla – Bug 784431
gd-two-lines-renderer: use Pango alpha attribute
Last modified: 2017-07-02 01:02:18 UTC
While it would be nice for Epiphany to eventually switch to using libdazzle's suggestion entry, the current rendering of the URL completions drives me crazy to no end. The second line in the cell renderers will render a dimly-lit version of the non-selected state foreground on a selected state background. This can easily be fixed by using the Pango alpha attribute instead of how it is currently done (presumably before the alpha attribute existed).
Created attachment 354778 [details] [review] gd-two-lines-renderer: use Pango alpha attribute This code was previously trying to alter the color of the second line by manipulating the foreground color. As Epiphany requires GTK+ 3.22, we can rely on the Pango alpha attr working correctly and therefore do not need this fallback. The problem with the code previously is that it would not respect the GTK_CELL_RENDERER_SELECTED state. It would draw the altered non-selected state with a dim-level on top of a selected row. By simply avoiding the foreground color altogether (and inheriting it from the PangoLayout state when rendering), we get the appropriate color and also blend into the selected row state properly.
Review of attachment 354778 [details] [review]: OK. I presume you want to commit this to libgd as well, right?
Oh it looks good!
Attachment 354778 [details] pushed as e1bf1d4 - gd-two-lines-renderer: use Pango alpha attribute
(In reply to Michael Catanzaro from comment #2) > I presume you want to commit this to libgd as well, right? That has now been done