Commit 8bfe474a authored by Noah Davis's avatar Noah Davis 🌵

Make shadow sizes linear

Summary: Before, shadow size doubled with each new size until Very Large and the smaller shadows were more transparent than the larger shadows. Now shadow size increases linearly and smaller shadows start with more opacity so that they don't become nearly invisible. The new shadows should look better on cheap displays.

Test Plan:
Before
======

Small: {F6622411}
{F6632347}
Medium: {F6622412}
{F6632346}
Large: {F6622413}
{F6632344}
Very Large: {F6622415}
{F6632341}

After
=====

Small: {F6624603}
{F6632334}
Medium: {F6624606}
{F6632335}
Large: {F6624608}
{F6632336}
Very Large: {F6624612}
{F6632337}

Reviewers: #vdg, #breeze, ngraham, rooty

Reviewed By: #vdg, #breeze, ngraham, rooty

Subscribers: filipf, ngraham, zzag, rooty, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19148
parent 985845b4
......@@ -104,23 +104,23 @@ namespace
// Small
CompositeShadowParams(
QPoint(0, 4),
ShadowParams(QPoint(0, 0), 16, 0.6),
ShadowParams(QPoint(0, -2), 4, 0.14)),
ShadowParams(QPoint(0, 0), 16, 1),
ShadowParams(QPoint(0, -2), 8, 0.4)),
// Medium
CompositeShadowParams(
QPoint(0, 8),
ShadowParams(QPoint(0, 0), 32, 0.7),
ShadowParams(QPoint(0, -5), 14, 0.12)),
ShadowParams(QPoint(0, 0), 32, 0.9),
ShadowParams(QPoint(0, -4), 16, 0.3)),
// Large
CompositeShadowParams(
QPoint(0, 18),
ShadowParams(QPoint(0, 0), 64, 0.8),
ShadowParams(QPoint(0, -10), 24, 0.1)),
QPoint(0, 12),
ShadowParams(QPoint(0, 0), 48, 0.8),
ShadowParams(QPoint(0, -6), 24, 0.2)),
// Very large
CompositeShadowParams(
QPoint(0, 26),
ShadowParams(QPoint(0, 0), 96, 0.95),
ShadowParams(QPoint(0, -12), 28, 0.1))
QPoint(0, 16),
ShadowParams(QPoint(0, 0), 64, 0.7),
ShadowParams(QPoint(0, -8), 32, 0.1)),
};
inline CompositeShadowParams lookupShadowParams(int size)
......
......@@ -58,24 +58,24 @@ namespace
CompositeShadowParams(),
// Small
CompositeShadowParams(
QPoint(0, 6),
ShadowParams(QPoint(0, 0), 12, 0.2),
ShadowParams(QPoint(0, -3), 6, 0.16)),
QPoint(0, 3),
ShadowParams(QPoint(0, 0), 12, 0.26),
ShadowParams(QPoint(0, -2), 6, 0.16)),
// Medium
CompositeShadowParams(
QPoint(0, 8),
ShadowParams(QPoint(0, 0), 16, 0.21),
ShadowParams(QPoint(0, -4), 6, 0.14)),
QPoint(0, 4),
ShadowParams(QPoint(0, 0), 16, 0.24),
ShadowParams(QPoint(0, -2), 8, 0.14)),
// Large
CompositeShadowParams(
QPoint(0, 10),
ShadowParams(QPoint(0, 0), 20, 0.23),
ShadowParams(QPoint(0, -5), 8, 0.12)),
QPoint(0, 5),
ShadowParams(QPoint(0, 0), 20, 0.22),
ShadowParams(QPoint(0, -3), 10, 0.12)),
// Very Large
CompositeShadowParams(
QPoint(0, 12),
ShadowParams(QPoint(0, 0), 24, 0.26),
ShadowParams(QPoint(0, -5), 10, 0.12))
QPoint(0, 6),
ShadowParams(QPoint(0, 0), 24, 0.2),
ShadowParams(QPoint(0, -3), 12, 0.1))
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment