Add shadow to menus and move shadows to palette
This commit is contained in:
parent
d88edb3a02
commit
8a22a2f7bb
@ -215,9 +215,8 @@ void Editor::setupMenu()
|
||||
QColor panel = flattenedColor( m_pal.primary, m_pal.background, 0.08 );
|
||||
setGradient( Q::Panel, panel );
|
||||
|
||||
QskShadowMetrics elevationLight1( 106, 20 );
|
||||
setShadowMetrics( Q::Panel | Q::Hovered, elevationLight1 );
|
||||
setShadowColor( Q::Panel | Q::Hovered, m_pal.shadow );
|
||||
setShadowMetrics( Q::Panel, m_pal.elevationLight2 );
|
||||
setShadowColor( Q::Panel, m_pal.shadow );
|
||||
|
||||
setMetric( Q::Separator | A::Size, qskDpiScaled( 1 ) );
|
||||
setBoxShape( Q::Separator, 0 );
|
||||
@ -462,8 +461,7 @@ void Editor::setupPushButton()
|
||||
c2.setAlphaF( 0.38 );
|
||||
setColor( Q::Text | Q::Disabled, c2 );
|
||||
|
||||
QskShadowMetrics elevationLight1( -6, 20 );
|
||||
setShadowMetrics( Q::Panel | Q::Hovered, elevationLight1 );
|
||||
setShadowMetrics( Q::Panel | Q::Hovered, m_pal.elevationLight1 );
|
||||
setShadowColor( Q::Panel | Q::Hovered, m_pal.shadow );
|
||||
|
||||
// Outlined and Text:
|
||||
@ -928,6 +926,9 @@ QskMaterialTheme::QskMaterialTheme( Lightness lightness,
|
||||
|
||||
shadow = m_palettes[ Neutral ].rgb( Q::W0 );
|
||||
}
|
||||
|
||||
elevationLight1 = QskShadowMetrics( -6, 20 );
|
||||
elevationLight2 = QskShadowMetrics( -5, 20 );
|
||||
}
|
||||
|
||||
QskMaterialSkin::QskMaterialSkin( const QskMaterialTheme& palette, QObject* parent )
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "QskMaterialGlobal.h"
|
||||
#include <QskSkin.h>
|
||||
#include <QskRgbPalette.h>
|
||||
#include <QskShadowMetrics.h>
|
||||
|
||||
#include <array>
|
||||
|
||||
@ -67,6 +68,9 @@ class QSK_MATERIAL_EXPORT QskMaterialTheme
|
||||
|
||||
QRgb shadow;
|
||||
|
||||
QskShadowMetrics elevationLight1;
|
||||
QskShadowMetrics elevationLight2;
|
||||
|
||||
const qreal hoverOpacity = 0.08;
|
||||
const qreal focusOpacity = 0.12;
|
||||
const qreal pressedOpacity = 0.12;
|
||||
|
Loading…
x
Reference in New Issue
Block a user