Bug 329312 - Vertical displacement distorts window shadow
Summary: Vertical displacement distorts window shadow
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: win deco (show other bugs)
Version: 4.10
Platform: Mageia RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-28 13:20 UTC by Carlos Vives
Modified: 2014-01-31 16:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Preset vertical displacement (41.20 KB, image/png)
2013-12-28 13:21 UTC, Carlos Vives
Details
10px vertical displacement (40.65 KB, image/png)
2013-12-28 13:21 UTC, Carlos Vives
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Vives 2013-12-28 13:20:57 UTC
Increasing vertical displacement for window shadows creates a thin bar below the window, not a window-sized shadow displaced down as expected.

Reproducible: Always

Steps to Reproduce:
1. Increase the vertical displacemente in window deco config to at least 8-10px
2. Shadow is distorted
Actual Results:  
A thin shadow is created below the window.

Expected Results:  
Window-sized shadow, vertically displaced.
Comment 1 Carlos Vives 2013-12-28 13:21:29 UTC
Created attachment 84304 [details]
Preset vertical displacement
Comment 2 Carlos Vives 2013-12-28 13:21:54 UTC
Created attachment 84305 [details]
10px vertical displacement
Comment 3 Hugo Pereira Da Costa 2013-12-28 14:49:00 UTC
yes. Its an artifact of the algorithm used to draw the shadow. There is a maximum limit of the vertical offset before its starts behaving badly.
Now since this limit actually depends on the size of the shadow (the other parameter), it is not easy to limit the corresponding spinbox (not impossible, because one can derive the mathematical formula that link the two, but I have not done yet). Will give it a shot, and limit the offset spinbox to a value that depends on the shadow size.
Comment 4 Hugo Pereira Da Costa 2014-01-31 16:06:46 UTC
Git commit 4d25fd45a829fc31a520e6a39ad9dbb3cab1fa65 by Hugo Pereira Da Costa.
Committed on 31/01/2014 at 16:03.
Pushed by hpereiradacosta into branch 'KDE/4.11'.

Make sure vertical offset does not fall outside of the shadow's inner part, to prevent artifacts.

M  +8    -8    libs/oxygen/oxygenshadowcache.cpp

http://commits.kde.org/kde-workspace/4d25fd45a829fc31a520e6a39ad9dbb3cab1fa65
Comment 5 Hugo Pereira Da Costa 2014-01-31 16:07:26 UTC
Git commit 097786d8bd8500b38001e5ec8d4ce6af3e23c588 by Hugo Pereira Da Costa.
Committed on 31/01/2014 at 16:03.
Pushed by hpereiradacosta into branch 'master'.

Make sure vertical offset does not fall outside of the shadow's inner part, to prevent artifacts.

M  +8    -8    libs/oxygen/oxygenshadowcache.cpp

http://commits.kde.org/kde-workspace/097786d8bd8500b38001e5ec8d4ce6af3e23c588
Comment 6 Hugo Pereira Da Costa 2014-01-31 16:10:23 UTC
That fixes it.
Admittingly this is not perfect since now you will just not see the difference when setting too large offsets, but setting a limit to the max value depending of the actual shadow size is too complicated at the moment.