Add shadow rendering helper functions
ClosedPublic

Authored by ndavis on Dec 19 2019, 12:02 AM.

Details

Summary

This patch makes other helper functions reuse more code by calling these shadow rendering functions instead of defining their own shadows.

The shadows are perfectly shaped, tested up to 8x scaling.
Without this patch, the radius of the shadows for checkboxes is slighly too wide and there is a gap between the inside edge of the radio button shadow and the outside edge of the radio button.
Shadow rendering performance has also been improved a bit.

Test Plan

run QT_SCALE_FACTOR=8 oxygen-demo5 and examine the shadows. You can try higher scaling levels, but that's overkill.

8x scaling

before:

after:

Diff Detail

Repository
R31 Breeze
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ndavis created this revision.Dec 19 2019, 12:02 AM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 19 2019, 12:02 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ndavis requested review of this revision.Dec 19 2019, 12:02 AM
ndavis edited the test plan for this revision. (Show Details)Dec 19 2019, 12:19 AM
ndavis added reviewers: hpereiradacosta, Plasma.
ndavis updated this revision to Diff 71825.Dec 19 2019, 12:31 AM

Edit ellipse shadow comment

ndavis edited the summary of this revision. (Show Details)Dec 19 2019, 12:58 AM
ndavis edited the test plan for this revision. (Show Details)
hpereiradacosta accepted this revision.Dec 19 2019, 3:59 PM

Looks good and sensible. Very nice consolidation. Thanks !

This revision is now accepted and ready to land.Dec 19 2019, 3:59 PM
ndavis updated this revision to Diff 71845.Dec 19 2019, 4:56 PM

Update ellipse shadow comment again and rounded rect shadow parameter name

This revision was automatically updated to reflect the committed changes.