Add shadow rendering helper functions

Authored by ndavis on Dec 16 2019, 9:00 PM.

Description

Add shadow rendering helper functions

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:

Reviewers: Breeze, hpereiradacosta, Plasma

Reviewed By: hpereiradacosta

Subscribers: ngraham, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D26094

Details

Committed
ndavisDec 19 2019, 4:56 PM
Reviewer
hpereiradacosta
Differential Revision
D26094: Add shadow rendering helper functions
Parents
R31:2c8e77821b2b: Don't use 0/nullptr as flags
Branches
Unknown
Tags
Unknown