Bug 791363 - Shadow vertical offset is wrong when scaling is > 2
Shadow vertical offset is wrong when scaling is > 2
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
:
Depends on:
Blocks: 765011
  Show dependency tree
 
Reported: 2017-12-07 22:00 UTC by Marco Trevisan (Treviño)
Modified: 2017-12-08 23:24 UTC (History)
3 users (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments
cssshadowvalue: don't apply the y_scale offset twice to the shadow (1.27 KB, patch)
2017-12-07 22:02 UTC, Marco Trevisan (Treviño)
committed Details | Diff | Review

Description Marco Trevisan (Treviño) 2017-12-07 22:00:16 UTC
The shadow offset is wrong when using scaling over 2.

As you can see in this https://imgur.com/U7tbJkO.png screenshot (same happens using default Adwaita of course).

The issue seems caused by commit 942e904 (as fix for bug 772075), probably a copy&paste error (?).

It can be easily tested launching something like:

  GDK_SCALE=3 gtk3-demo # forcing GDK backend to X11 might be needed in wayland

This affects fractional scaling, as for any scaling > 2 we'll scale the widgets up to 3.
Comment 1 Marco Trevisan (Treviño) 2017-12-07 22:02:27 UTC
Created attachment 365214 [details] [review]
cssshadowvalue: don't apply the y_scale offset twice to the shadow

Removing double-offset causing the issue here.
Using the same shadow of above [1], as you can see everything works:
 https://imgur.com/lVKGI4o

[1] decoration { box-shadow: -5px -5px 4px 20px red; }
Comment 2 Matthias Clasen 2017-12-07 23:06:28 UTC
Review of attachment 365214 [details] [review]:

good catch
Comment 3 Matthias Clasen 2017-12-08 23:24:54 UTC
Attachment 365214 [details] pushed as 29f36fe - cssshadowvalue: don't apply the y_scale offset twice to the shadow

Note You need to log in before you can comment on or make changes to this bug.