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 788039 - theming: same setting for text-shadow and icon-shadow result in different opacity rendering
theming: same setting for text-shadow and icon-shadow result in different opa...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-09-22 08:42 UTC by Jakub Steiner
Modified: 2017-09-22 15:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
icon-shadow going bonkers (63.59 KB, image/png)
2017-09-22 08:43 UTC, Jakub Steiner
  Details
shadow: Only use correctly sized textures for shortcut (2.58 KB, patch)
2017-09-22 14:17 UTC, Florian Müllner
committed Details | Review

Description Jakub Steiner 2017-09-22 08:42:18 UTC
I noticed teh shadows on the top bar render differently for icons and text, despite using the same CSS.

Most visible on the hover states:

/* .panel-button */

    &:hover {
      text-shadow: 0px 1px 6px rgba(0, 0, 0, 1);

      .system-status-icon,
      .app-menu-icon > StIcon,
      .popup-menu-arrow {
        icon-shadow: 0px 1px 6px rgba(0, 0, 0, 1);
      }
    }

I am guessing this has to do with the alpha channel mask computation, because I noticed it goes bonkers on some icons, like the firefox nightly (screenshot attached).
Comment 1 Jakub Steiner 2017-09-22 08:43:23 UTC
Created attachment 360246 [details]
icon-shadow going bonkers
Comment 2 Florian Müllner 2017-09-22 14:17:41 UTC
Created attachment 360262 [details] [review]
shadow: Only use correctly sized textures for shortcut

When creating a shadow for a ClutterTexture, we currently use the
underlying CoglTexture directly instead of rendering the actor to
an offscreen buffer. This assumes that the CoglTexture is directly
suitable as shadow source, which isn't necessarily the case - it
may have a very different size than what is shown and scaled up or
down by the hardware. In that case we end up with a scaled shadow
texture as well, which messes up the desired blur effect - the
result will be too light when scaling up, or too sharp when scaling
down. To fix this, only take the shortcut when a ClutterTexture's
underlying texture has the correct size and fall back to offscreen
rendering otherwise.
Comment 3 Rui Matos 2017-09-22 15:06:29 UTC
Review of attachment 360262 [details] [review]:

good catch, looks good
Comment 4 Florian Müllner 2017-09-22 15:11:47 UTC
Attachment 360262 [details] pushed as 7015bb2 - shadow: Only use correctly sized textures for shortcut