style dialogs
This commit is contained in:
parent
35e61ce52a
commit
f0fbb084f6
|
@ -522,7 +522,7 @@ void Editor::setupDialogButtonBox()
|
||||||
{
|
{
|
||||||
using Q = QskDialogButtonBox;
|
using Q = QskDialogButtonBox;
|
||||||
|
|
||||||
setGradient( Q::Panel, m_pal.background );
|
setGradient( Q::Panel, m_pal.secondaryContainer );
|
||||||
setBoxShape( Q::Panel, 0 );
|
setBoxShape( Q::Panel, 0 );
|
||||||
setBoxBorderMetrics( Q::Panel, 0 );
|
setBoxBorderMetrics( Q::Panel, 0 );
|
||||||
}
|
}
|
||||||
|
@ -825,23 +825,26 @@ void Editor::setupSubWindow()
|
||||||
|
|
||||||
// Panel
|
// Panel
|
||||||
|
|
||||||
setPadding( Q::Panel, 10 );
|
setPadding( Q::Panel, { 24, 0, 24, 24 } );
|
||||||
setBoxShape( Q::Panel, 0 );
|
setStrutSize( Q::Panel, { 280, -1 } );
|
||||||
setBoxBorderMetrics( Q::Panel, 2 );
|
setBoxShape( Q::Panel, 28 );
|
||||||
setGradient( Q::Panel, m_pal.onBackground );
|
setBoxBorderMetrics( Q::Panel, 0 );
|
||||||
|
setGradient( Q::Panel, m_pal.secondaryContainer );
|
||||||
setBoxBorderColors( Q::Panel, m_pal.primary );
|
setShadowMetrics( Q::Panel, m_pal.elevationLight3 );
|
||||||
|
setShadowColor( Q::Panel, m_pal.shadow );
|
||||||
|
|
||||||
// TitleBarPanel
|
// TitleBarPanel
|
||||||
|
setBoxShape( Q::TitleBarPanel, 28 );
|
||||||
|
setPadding( Q::TitleBarPanel, { 24, 24, 24, 16 } );
|
||||||
setFlagHint( Q::TitleBarPanel | QskAspect::Style,
|
setFlagHint( Q::TitleBarPanel | QskAspect::Style,
|
||||||
Q::TitleBar | Q::Title | Q::Symbol );
|
Q::TitleBar | Q::Title | Q::Symbol );
|
||||||
|
|
||||||
setGradient( Q::TitleBarPanel, m_pal.surface );
|
setGradient( Q::TitleBarPanel, m_pal.secondaryContainer );
|
||||||
setGradient( Q::TitleBarPanel | Q::Focused, m_pal.surfaceVariant );
|
|
||||||
|
|
||||||
// TitleBarText
|
// TitleBarText
|
||||||
setFontRole( Q::TitleBarText, QskSkin::SmallFont );
|
setFontRole( Q::TitleBarText, QskMaterial3Skin::M3HeadlineSmall );
|
||||||
setAlignment( Q::TitleBarText, Qt::AlignLeft | Qt::AlignVCenter );
|
setColor( Q::TitleBarText, m_pal.onSurface );
|
||||||
|
setAlignment( Q::TitleBarText, Qt::AlignCenter );
|
||||||
|
|
||||||
for ( auto subControl : { Q::Panel, Q::TitleBarPanel, Q::TitleBarText } )
|
for ( auto subControl : { Q::Panel, Q::TitleBarPanel, Q::TitleBarText } )
|
||||||
setAnimation( subControl | A::Color, qskDuration );
|
setAnimation( subControl | A::Color, qskDuration );
|
||||||
|
@ -946,6 +949,7 @@ QskMaterial3Theme::QskMaterial3Theme(Lightness lightness,
|
||||||
|
|
||||||
elevationLight1 = QskShadowMetrics( -3, 5, { 0, 2 } );
|
elevationLight1 = QskShadowMetrics( -3, 5, { 0, 2 } );
|
||||||
elevationLight2 = QskShadowMetrics( -2, 8, { 0, 2 } );
|
elevationLight2 = QskShadowMetrics( -2, 8, { 0, 2 } );
|
||||||
|
elevationLight3 = QskShadowMetrics( -1, 11, { 0, 2 } );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskMaterial3Skin::QskMaterial3Skin( const QskMaterial3Theme& palette, QObject* parent )
|
QskMaterial3Skin::QskMaterial3Skin( const QskMaterial3Theme& palette, QObject* parent )
|
||||||
|
@ -966,6 +970,7 @@ void QskMaterial3Skin::setupFonts()
|
||||||
Inherited::setupFonts( QStringLiteral( "Roboto" ) );
|
Inherited::setupFonts( QStringLiteral( "Roboto" ) );
|
||||||
|
|
||||||
setFont( M3BodyLarge, createFont( 16 ) );
|
setFont( M3BodyLarge, createFont( 16 ) );
|
||||||
|
setFont( M3HeadlineSmall, createFont( 28 ) );
|
||||||
setFont( M3LabelLarge, createFont( 14 ) );
|
setFont( M3LabelLarge, createFont( 14 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,7 @@ class QSK_MATERIAL3_EXPORT QskMaterial3Theme
|
||||||
|
|
||||||
QskShadowMetrics elevationLight1;
|
QskShadowMetrics elevationLight1;
|
||||||
QskShadowMetrics elevationLight2;
|
QskShadowMetrics elevationLight2;
|
||||||
|
QskShadowMetrics elevationLight3;
|
||||||
|
|
||||||
const qreal hoverOpacity = 0.08;
|
const qreal hoverOpacity = 0.08;
|
||||||
const qreal focusOpacity = 0.12;
|
const qreal focusOpacity = 0.12;
|
||||||
|
@ -98,6 +99,7 @@ class QSK_MATERIAL3_EXPORT QskMaterial3Skin : public QskSkin
|
||||||
enum FontRole
|
enum FontRole
|
||||||
{
|
{
|
||||||
M3BodyLarge = QskSkin::HugeFont + 1,
|
M3BodyLarge = QskSkin::HugeFont + 1,
|
||||||
|
M3HeadlineSmall,
|
||||||
M3LabelLarge,
|
M3LabelLarge,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue