After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784431 - gd-two-lines-renderer: use Pango alpha attribute
gd-two-lines-renderer: use Pango alpha attribute
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Interface
unspecified
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-01 22:06 UTC by Christian Hergert
Modified: 2017-07-02 01:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gd-two-lines-renderer: use Pango alpha attribute (2.82 KB, patch)
2017-07-01 22:07 UTC, Christian Hergert
committed Details | Review

Description Christian Hergert 2017-07-01 22:06:58 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).
Comment 1 Christian Hergert 2017-07-01 22:07:01 UTC
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.
Comment 2 Michael Catanzaro 2017-07-01 22:43:02 UTC
Review of attachment 354778 [details] [review]:

OK.

I presume you want to commit this to libgd as well, right?
Comment 3 Michael Catanzaro 2017-07-01 23:45:38 UTC
Oh it looks good!
Comment 4 Michael Catanzaro 2017-07-01 23:46:01 UTC
Attachment 354778 [details] pushed as e1bf1d4 - gd-two-lines-renderer: use Pango alpha attribute
Comment 5 Christian Hergert 2017-07-02 01:02:18 UTC
(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