Commit 9fb5d3ab authored by Nathaniel Graham's avatar Nathaniel Graham

Horizontally center shadows and make them bigger

Summary:
FEATURE: 388256

#VDG has decided that shadows should be horizontally centered and bigger. This patch implements those changes in the following way:
- Window and menu shadows are now horizontally centered
- Shadow size increased to the maximum value
- Shadow color changed from pure black to a slightly lighter Breeze standard color: Shade Black

Test Plan:
Tested in KDE Neon. Before:
{F5587393}

After:
{F5587390}

Reviewers: abetts, hpereiradacosta, #vdg, #breeze, alake

Reviewed By: abetts, hpereiradacosta, #vdg

Subscribers: rkflx, zzag, cfeck, januz, rpelorosso, apol, mvourlakos, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9549
parent 6992b8da
......@@ -668,8 +668,8 @@ namespace Breeze
// contrast pixel
QRectF innerRect = QRectF(
g_shadowSize - shadowOffset - Metrics::Shadow_Overlap, g_shadowSize - shadowOffset - Metrics::Shadow_Overlap,
shadowOffset + 2*Metrics::Shadow_Overlap, shadowOffset + 2*Metrics::Shadow_Overlap );
g_shadowSize - Metrics::Shadow_Overlap, g_shadowSize - shadowOffset - Metrics::Shadow_Overlap,
2*Metrics::Shadow_Overlap, shadowOffset + 2*Metrics::Shadow_Overlap );
painter.setPen( gradientStopColor( g_shadowColor, g_shadowStrength*0.5 ) );
painter.setBrush( Qt::NoBrush );
......@@ -685,7 +685,7 @@ namespace Breeze
g_sShadow = QSharedPointer<KDecoration2::DecorationShadow>::create();
g_sShadow->setPadding( QMargins(
g_shadowSize - shadowOffset - Metrics::Shadow_Overlap,
g_shadowSize - Metrics::Shadow_Overlap,
g_shadowSize - shadowOffset - Metrics::Shadow_Overlap,
g_shadowSize - Metrics::Shadow_Overlap,
g_shadowSize - Metrics::Shadow_Overlap ) );
......
......@@ -14,13 +14,13 @@
</entry>
<entry name="ShadowSize" type = "Int">
<default>16</default>
<default>64</default>
<min>6</min>
<max>64</max>
<max>100</max>
</entry>
<entry name="ShadowColor" type = "Color">
<default>0, 0, 0</default>
<default>35, 38, 41</default>
</entry>
<!-- close button -->
......
......@@ -51,7 +51,7 @@ namespace Breeze
const int size( shadowSize - Metrics::Shadow_Overlap );
const int topSize( size - shadowOffset );
const int bottomSize( size );
const int leftSize( size - shadowOffset );
const int leftSize( size );
const int rightSize( size );
// get tileSet rect
......
......@@ -261,8 +261,8 @@ namespace Breeze
p.setBrush( Qt::black );
QRectF innerRect(
shadowSize - shadowOffset - Metrics::Shadow_Overlap, shadowSize - shadowOffset - Metrics::Shadow_Overlap,
shadowOffset + 2*Metrics::Shadow_Overlap,shadowOffset + 2*Metrics::Shadow_Overlap );
shadowSize - Metrics::Shadow_Overlap, shadowSize - shadowOffset - Metrics::Shadow_Overlap,
2*Metrics::Shadow_Overlap,shadowOffset + 2*Metrics::Shadow_Overlap );
p.setCompositionMode(QPainter::CompositionMode_DestinationOut );
......@@ -516,7 +516,7 @@ namespace Breeze
int size( shadowSize - Metrics::Shadow_Overlap );
int topSize = ( size - shadowOffset ) * devicePixelRatio;
int bottomSize = size * devicePixelRatio;
const int leftSize( (size - shadowOffset) * devicePixelRatio );
const int leftSize( size * devicePixelRatio );
const int rightSize( size * devicePixelRatio );
if( widget->inherits( "QBalloonTip" ) )
......
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