Add ShadowedImage and ShadowedTexture items
ClosedPublic

Authored by ahiemstra on Mar 23 2020, 4:47 PM.

Details

Summary

This adds the ShadowedImage and ShadowedTexture items. The first is a
QML-only item that makes use of the second. The second is a
ShadowedRectangle that uses a texture as color source for the item
instead of just a color.

It also does some cleanup on the scenegraph/shader related bits
introduced with ShadowedRectangle. Most importantly, it removes the
mostly duplicated core shaders in favour of a simple solution using
a #define.

Test Plan

There's a manual test included. It should look like this:

Diff Detail

Repository
R169 Kirigami
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ahiemstra created this revision.Mar 23 2020, 4:47 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptMar 23 2020, 4:47 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ahiemstra requested review of this revision.Mar 23 2020, 4:47 PM
ahiemstra edited the test plan for this revision. (Show Details)Mar 23 2020, 4:48 PM
mart added a subscriber: mart.Mar 23 2020, 5:42 PM

+100, works very well here.
an api question. it was supposed to be possible to have the corners with independent radius (to have things like an image rounded only at top) would it still be possible with that approach? i guess would be expanding roundedrectangle to have independent radiuses?

Yeah if we split the radius into 4 that should be doable. The shader supports it, just need to bubble everything up all the way to the items.

mart accepted this revision.Mar 27 2020, 9:34 AM

this one i think is good to go, then afterwards, the independent radii

This revision is now accepted and ready to land.Mar 27 2020, 9:34 AM
This revision was automatically updated to reflect the committed changes.