making gray/color values more obvious
This commit is contained in:
parent
b7f02b558e
commit
042523d9e3
@ -56,6 +56,11 @@
|
|||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
inline constexpr QRgb rgbGray( int value, qreal opacity = 1.0 )
|
||||||
|
{
|
||||||
|
return qRgba( value, value, value, qRound( opacity * 255 ) );
|
||||||
|
}
|
||||||
|
|
||||||
inline QRgb flattenedColor( QRgb foregroundColor, QRgb backgroundColor )
|
inline QRgb flattenedColor( QRgb foregroundColor, QRgb backgroundColor )
|
||||||
{
|
{
|
||||||
const qreal alphaRatio = ( ( foregroundColor & QskRgb::AlphaMask ) >> 24 ) / 255.0;
|
const qreal alphaRatio = ( ( foregroundColor & QskRgb::AlphaMask ) >> 24 ) / 255.0;
|
||||||
@ -955,290 +960,274 @@ QskFluent2Theme::QskFluent2Theme( Theme lightness )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QskFluent2Theme::QskFluent2Theme( Theme theme, std::array< QRgb, NumAccentColors > accentColors )
|
QskFluent2Theme::QskFluent2Theme( Theme theme,
|
||||||
|
const std::array< QRgb, NumAccentColors >& accentColors )
|
||||||
{
|
{
|
||||||
if( theme == Light )
|
if( theme == Light )
|
||||||
{
|
{
|
||||||
// Fill color:
|
// Fill color:
|
||||||
|
|
||||||
palette.fillColor.text.primary = QskRgb::toTransparentF( 0xff000000, 0.8956 );
|
palette.fillColor.text.primary = rgbGray( 0, 0.8956 );
|
||||||
palette.fillColor.text.secondary = QskRgb::toTransparentF( 0xff000000, 0.6063 );
|
palette.fillColor.text.secondary = rgbGray( 0, 0.6063 );
|
||||||
palette.fillColor.text.tertiary = QskRgb::toTransparentF( 0xff000000, 0.4458 );
|
palette.fillColor.text.tertiary = rgbGray( 0, 0.4458 );
|
||||||
palette.fillColor.text.disabled = QskRgb::toTransparentF( 0xff000000, 0.3614 );
|
palette.fillColor.text.disabled = rgbGray( 0, 0.3614 );
|
||||||
|
|
||||||
palette.fillColor.accentText.primary = accentColors[ AccentDark2 ];
|
palette.fillColor.accentText.primary = accentColors[ AccentDark2 ];
|
||||||
palette.fillColor.accentText.secondary = accentColors[ AccentDark3 ];
|
palette.fillColor.accentText.secondary = accentColors[ AccentDark3 ];
|
||||||
palette.fillColor.accentText.tertiary = accentColors[ AccentDark1 ];
|
palette.fillColor.accentText.tertiary = accentColors[ AccentDark1 ];
|
||||||
palette.fillColor.accentText.disabled = QskRgb::toTransparentF( 0xff000000, 0.3614 );
|
palette.fillColor.accentText.disabled = rgbGray( 0, 0.3614 );
|
||||||
|
|
||||||
palette.fillColor.textOnAccent.primary = 0xffffffff;
|
palette.fillColor.textOnAccent.primary = rgbGray( 255 );
|
||||||
palette.fillColor.textOnAccent.secondary = QskRgb::toTransparentF( 0xffffffff, 0.70 );
|
palette.fillColor.textOnAccent.secondary = rgbGray( 255, 0.70 );
|
||||||
palette.fillColor.textOnAccent.disabled = 0xffffffff;
|
palette.fillColor.textOnAccent.disabled = rgbGray( 255 );
|
||||||
palette.fillColor.textOnAccent.selectedText = 0xffffffff;
|
palette.fillColor.textOnAccent.selectedText = rgbGray( 255 );
|
||||||
|
|
||||||
palette.fillColor.control.transparent = Qt::transparent;
|
palette.fillColor.control.transparent = Qt::transparent;
|
||||||
palette.fillColor.control.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.70 );
|
palette.fillColor.control.defaultColor = rgbGray( 255, 0.70 );
|
||||||
palette.fillColor.control.secondary = QskRgb::toTransparentF( 0xffF9F9F9, 0.50 );
|
palette.fillColor.control.secondary = rgbGray( 249, 0.50 );
|
||||||
palette.fillColor.control.tertiary = QskRgb::toTransparentF( 0xffF9F9F9, 0.30 );
|
palette.fillColor.control.tertiary = rgbGray( 249, 0.30 );
|
||||||
palette.fillColor.control.inputActive = 0xffffffff;
|
palette.fillColor.control.inputActive = rgbGray( 255 );
|
||||||
palette.fillColor.control.disabled = QskRgb::toTransparentF( 0xffF9F9F9, 0.30 );
|
palette.fillColor.control.disabled = rgbGray( 249, 0.30 );
|
||||||
|
|
||||||
palette.fillColor.controlStrong.defaultColor = QskRgb::toTransparentF( 0xff000000, 0.4458 );
|
palette.fillColor.controlStrong.defaultColor = rgbGray( 0, 0.4458 );
|
||||||
palette.fillColor.controlStrong.disabled = QskRgb::toTransparentF( 0xff000000, 0.3173 );
|
palette.fillColor.controlStrong.disabled = rgbGray( 0, 0.3173 );
|
||||||
|
|
||||||
palette.fillColor.subtle.transparent = Qt::transparent;
|
palette.fillColor.subtle.transparent = Qt::transparent;
|
||||||
palette.fillColor.subtle.secondary =QskRgb::toTransparentF( 0xff000000, 0.0373 );
|
palette.fillColor.subtle.secondary = rgbGray( 0, 0.0373 );
|
||||||
palette.fillColor.subtle.tertiary = QskRgb::toTransparentF( 0xff000000, 0.0241 );
|
palette.fillColor.subtle.tertiary = rgbGray( 0, 0.0241 );
|
||||||
palette.fillColor.subtle.disabled = Qt::transparent;
|
palette.fillColor.subtle.disabled = Qt::transparent;
|
||||||
|
|
||||||
palette.fillColor.controlSolid.defaultColor = 0xffffffff;
|
palette.fillColor.controlSolid.defaultColor = rgbGray( 255 );
|
||||||
|
|
||||||
palette.fillColor.controlAlt.transparent = Qt::transparent;
|
palette.fillColor.controlAlt.transparent = Qt::transparent;
|
||||||
palette.fillColor.controlAlt.secondary = QskRgb::toTransparentF( 0xff000000, 0.0241 );
|
palette.fillColor.controlAlt.secondary = rgbGray( 0, 0.0241 );
|
||||||
palette.fillColor.controlAlt.tertiary = QskRgb::toTransparentF( 0xff000000, 0.0578 );
|
palette.fillColor.controlAlt.tertiary = rgbGray( 0, 0.0578 );
|
||||||
palette.fillColor.controlAlt.quaternary = QskRgb::toTransparentF( 0xff000000, 0.0924 );
|
palette.fillColor.controlAlt.quaternary = rgbGray( 0, 0.0924 );
|
||||||
palette.fillColor.controlAlt.disabled = Qt::transparent;
|
palette.fillColor.controlAlt.disabled = Qt::transparent;
|
||||||
|
|
||||||
palette.fillColor.accent.defaultColor = accentColors[ AccentDark1 ];
|
palette.fillColor.accent.defaultColor = accentColors[ AccentDark1 ];
|
||||||
palette.fillColor.accent.secondary = QskRgb::toTransparentF( accentColors[ AccentDark1 ], 0.90 );
|
palette.fillColor.accent.secondary = QskRgb::toTransparentF( accentColors[ AccentDark1 ], 0.90 );
|
||||||
palette.fillColor.accent.tertiary = QskRgb::toTransparentF( accentColors[ AccentDark1 ], 0.80 );
|
palette.fillColor.accent.tertiary = QskRgb::toTransparentF( accentColors[ AccentDark1 ], 0.80 );
|
||||||
palette.fillColor.accent.disabled = QskRgb::toTransparentF( 0xff000000, 0.2169 );
|
palette.fillColor.accent.disabled = rgbGray( 0, 0.2169 );
|
||||||
palette.fillColor.accent.selectedTextBackground = accentColors[ AccentBase ];
|
palette.fillColor.accent.selectedTextBackground = accentColors[ AccentBase ];
|
||||||
|
|
||||||
palette.fillColor.system.critical = 0xffC42B1C;
|
palette.fillColor.system.critical = 0xffc42b1c;
|
||||||
palette.fillColor.system.success = 0xff0F7B0F;
|
palette.fillColor.system.success = 0xff0f7b0f;
|
||||||
palette.fillColor.system.attention = 0xff005FB7;
|
palette.fillColor.system.attention = 0xff005fb7;
|
||||||
palette.fillColor.system.caution = 0xff9D5D00;
|
palette.fillColor.system.caution = 0xff9d5d00;
|
||||||
palette.fillColor.system.attentionBackground = QskRgb::toTransparentF( 0xffF6F6F6, 0.50 );
|
palette.fillColor.system.attentionBackground = rgbGray( 246, 0.50 );
|
||||||
palette.fillColor.system.successBackground = 0xffDFF6DD;
|
palette.fillColor.system.successBackground = 0xffdff6dd;
|
||||||
palette.fillColor.system.cautionBackground = 0xffFFF4CE;
|
palette.fillColor.system.cautionBackground = 0xfffff4ce;
|
||||||
palette.fillColor.system.criticalBackground = 0xffFDE7E9;
|
palette.fillColor.system.criticalBackground = 0xfffde7e9;
|
||||||
palette.fillColor.system.neutral = QskRgb::toTransparentF( 0xff000000, 0.4458 );
|
palette.fillColor.system.neutral = rgbGray( 0, 0.4458 );
|
||||||
palette.fillColor.system.neutralBackground = QskRgb::toTransparentF( 0xff000000, 0.0241 );
|
palette.fillColor.system.neutralBackground = rgbGray( 0, 0.0241 );
|
||||||
palette.fillColor.system.solidNeutral = 0xff8A8A8A;
|
palette.fillColor.system.solidNeutral = rgbGray( 138 );
|
||||||
palette.fillColor.system.solidAttentionBackground = 0xffF7F7F7;
|
palette.fillColor.system.solidAttentionBackground = rgbGray( 247 );
|
||||||
palette.fillColor.system.solidNeutralBackground = 0xffF3F3F3;
|
palette.fillColor.system.solidNeutralBackground = rgbGray( 243 );
|
||||||
|
|
||||||
// Elevation:
|
// Elevation:
|
||||||
|
|
||||||
palette.elevation.control.border = { QskRgb::toTransparentF( 0xff000000, 0.0578 ),
|
palette.elevation.control.border = { rgbGray( 0, 0.0578 ), rgbGray( 0, 0.1622 ) };
|
||||||
QskRgb::toTransparentF( 0xff000000, 0.1622 ) };
|
palette.elevation.circle.border = { rgbGray( 0, 0.0578 ), rgbGray( 0, 0.1622 ) };
|
||||||
|
palette.elevation.textControl.border = { rgbGray( 0, 0.0578 ), palette.fillColor.text.secondary };
|
||||||
palette.elevation.circle.border = { QskRgb::toTransparentF( 0xff000000, 0.0578 ),
|
palette.elevation.textControl.borderFocused = { rgbGray( 0, 0.0578 ), rgbGray( 0, 0.0578 ) };
|
||||||
QskRgb::toTransparentF( 0xff000000, 0.1622 ) };
|
palette.elevation.accentControl.border = { rgbGray( 255, 0.08 ), rgbGray( 0, 0.40 ) };
|
||||||
|
|
||||||
palette.elevation.textControl.border = { QskRgb::toTransparentF( 0xff000000, 0.0578 ),
|
|
||||||
palette.fillColor.text.secondary };
|
|
||||||
|
|
||||||
palette.elevation.textControl.borderFocused = { QskRgb::toTransparentF( 0xff000000, 0.0578 ),
|
|
||||||
QskRgb::toTransparentF( 0xff000000, 0.0578 ) };
|
|
||||||
|
|
||||||
palette.elevation.accentControl.border = { QskRgb::toTransparentF( 0xffffffff, 0.08 ),
|
|
||||||
QskRgb::toTransparentF( 0xff000000, 0.40 ) };
|
|
||||||
|
|
||||||
// Stroke color:
|
// Stroke color:
|
||||||
|
|
||||||
palette.strokeColor.controlStroke.defaultColor = QskRgb::toTransparentF( 0xff000000, 0.0578 );
|
palette.strokeColor.controlStroke.defaultColor = rgbGray( 0, 0.0578 );
|
||||||
palette.strokeColor.controlStroke.secondary = QskRgb::toTransparentF( 0xff000000, 0.1622 );
|
palette.strokeColor.controlStroke.secondary = rgbGray( 0, 0.1622 );
|
||||||
palette.strokeColor.controlStroke.onAccentDefault = QskRgb::toTransparentF( 0xffffffff, 0.08 );
|
palette.strokeColor.controlStroke.onAccentDefault = rgbGray( 255.08 );
|
||||||
palette.strokeColor.controlStroke.onAccentSecondary = QskRgb::toTransparentF( 0xff000000, 0.40 );
|
palette.strokeColor.controlStroke.onAccentSecondary = rgbGray( 0, 0.40 );
|
||||||
palette.strokeColor.controlStroke.onAccentTertiary = QskRgb::toTransparentF( 0xff000000, 0.2169 );
|
palette.strokeColor.controlStroke.onAccentTertiary = rgbGray( 0, 0.2169 );
|
||||||
palette.strokeColor.controlStroke.onAccentDisabled = QskRgb::toTransparentF( 0xff000000, 0.0578 );
|
palette.strokeColor.controlStroke.onAccentDisabled = rgbGray( 0, 0.0578 );
|
||||||
palette.strokeColor.controlStroke.forStrongFillWhenOnImage = QskRgb::toTransparentF( 0xffffffff, 0.35 );
|
palette.strokeColor.controlStroke.forStrongFillWhenOnImage = rgbGray( 255, 0.35 );
|
||||||
|
|
||||||
palette.strokeColor.controlStrongStroke.defaultColor = QskRgb::toTransparentF( 0xff000000, 0.4458 );
|
palette.strokeColor.controlStrongStroke.defaultColor = rgbGray( 0, 0.4458 );
|
||||||
palette.strokeColor.controlStrongStroke.disabled = QskRgb::toTransparentF( 0xff000000, 0.2169 );
|
palette.strokeColor.controlStrongStroke.disabled = rgbGray( 0, 0.2169 );
|
||||||
|
|
||||||
palette.strokeColor.cardStroke.defaultColor = QskRgb::toTransparentF( 0xff000000, 0.0578 );
|
palette.strokeColor.cardStroke.defaultColor = rgbGray( 0, 0.0578 );
|
||||||
palette.strokeColor.cardStroke.defaultSolid = 0xffEBEBEB;
|
palette.strokeColor.cardStroke.defaultSolid = rgbGray( 235 );
|
||||||
|
|
||||||
palette.strokeColor.dividerStroke.defaultColor = QskRgb::toTransparentF( 0xff000000, 0.0803 );
|
palette.strokeColor.dividerStroke.defaultColor = rgbGray( 0, 0.0803 );
|
||||||
|
|
||||||
palette.strokeColor.surfaceStroke.defaultColor = QskRgb::toTransparentF( 0xff757575, 0.40 );
|
palette.strokeColor.surfaceStroke.defaultColor = rgbGray( 117, 0.40 );
|
||||||
palette.strokeColor.surfaceStroke.flyout = QskRgb::toTransparentF( 0xff000000, 0.0578 );
|
palette.strokeColor.surfaceStroke.flyout = rgbGray( 0, 0.0578 );
|
||||||
|
|
||||||
palette.strokeColor.focusStroke.outer = QskRgb::toTransparentF( 0xff000000, 0.8956 );
|
palette.strokeColor.focusStroke.outer = rgbGray( 0, 0.8956 );
|
||||||
palette.strokeColor.focusStroke.inner = 0xffffffff;
|
palette.strokeColor.focusStroke.inner = rgbGray( 255 );
|
||||||
|
|
||||||
// Background:
|
// Background:
|
||||||
|
|
||||||
palette.background.fillColor.cardBackground.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.70 );
|
palette.background.fillColor.cardBackground.defaultColor = rgbGray( 255, 0.70 );
|
||||||
palette.background.fillColor.cardBackground.secondary = QskRgb::toTransparentF( 0xffF6F6F6, 0.50 );
|
palette.background.fillColor.cardBackground.secondary = rgbGray( 246, 0.50 );
|
||||||
palette.background.fillColor.cardBackground.tertiary = 0xffffffff;
|
palette.background.fillColor.cardBackground.tertiary = rgbGray( 255 );
|
||||||
|
|
||||||
palette.background.fillColor.smoke.defaultColor = QskRgb::toTransparentF( 0xff000000, 0.30 );
|
palette.background.fillColor.smoke.defaultColor = rgbGray( 0, 0.30 );
|
||||||
|
|
||||||
palette.background.fillColor.layer.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.50 );
|
palette.background.fillColor.layer.defaultColor = rgbGray( 255, 0.50 );
|
||||||
palette.background.fillColor.layer.alt = 0xffffffff;
|
palette.background.fillColor.layer.alt = rgbGray( 255 );
|
||||||
|
|
||||||
palette.background.fillColor.layerOnAcrylic.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.25 );
|
palette.background.fillColor.layerOnAcrylic.defaultColor = rgbGray( 255, 0.25 );
|
||||||
|
|
||||||
palette.background.fillColor.layerOnAccentAcrylic.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.25 );
|
palette.background.fillColor.layerOnAccentAcrylic.defaultColor = rgbGray( 255, 0.25 );
|
||||||
|
|
||||||
palette.background.fillColor.acrylicBackground.defaultColor = QskRgb::toTransparentF( 0xffFCFCFC, 0.85 );
|
palette.background.fillColor.acrylicBackground.defaultColor = rgbGray( 252, 0.85 );
|
||||||
palette.background.fillColor.acrylicBackground.base = QskRgb::toTransparentF( 0xffF3F3F3, 0.90 );
|
palette.background.fillColor.acrylicBackground.base = rgbGray( 243, 0.90 );
|
||||||
|
|
||||||
palette.background.fillColor.accentAcrylicBackground.base = QskRgb::toTransparentF( accentColors[ AccentLight3 ], 0.90 );
|
palette.background.fillColor.accentAcrylicBackground.base = QskRgb::toTransparentF( accentColors[ AccentLight3 ], 0.90 );
|
||||||
palette.background.fillColor.accentAcrylicBackground.defaultColor = QskRgb::toTransparentF( accentColors[ AccentLight3 ], 0.90 );
|
palette.background.fillColor.accentAcrylicBackground.defaultColor = QskRgb::toTransparentF( accentColors[ AccentLight3 ], 0.90 );
|
||||||
|
|
||||||
palette.background.fillColor.micaBackground.base = QskRgb::toTransparentF( 0xffffffff, 0.50 );
|
palette.background.fillColor.micaBackground.base = rgbGray( 255, 0.50 );
|
||||||
|
|
||||||
palette.background.fillColor.solidBackground.base = 0xffF3F3F3;
|
palette.background.fillColor.solidBackground.base = rgbGray( 243 );
|
||||||
palette.background.fillColor.solidBackground.secondary = 0xffEEEEEE;
|
palette.background.fillColor.solidBackground.secondary = rgbGray( 238 );
|
||||||
palette.background.fillColor.solidBackground.tertiary = 0xffF9F9F9;
|
palette.background.fillColor.solidBackground.tertiary = rgbGray( 249 );
|
||||||
palette.background.fillColor.solidBackground.quaternary = 0xffffffff;
|
palette.background.fillColor.solidBackground.quaternary = rgbGray( 255 );
|
||||||
|
|
||||||
|
|
||||||
// Shadow:
|
// Shadow:
|
||||||
|
|
||||||
shadow.cardRest = qMakePair( QskShadowMetrics( 0, 4, QPointF( 0, 2 ) ), QskRgb::toTransparentF( 0xff000000, 0.04 ) );
|
shadow.cardRest = { QskShadowMetrics( 0, 4, QPointF( 0, 2 ) ), rgbGray( 0, 0.04 ) };
|
||||||
shadow.cardHover = qMakePair( QskShadowMetrics( 0, 4, QPointF( 0, 2 ) ), QskRgb::toTransparentF( 0xff000000, 0.10 ) );
|
shadow.cardHover = { QskShadowMetrics( 0, 4, QPointF( 0, 2 ) ), rgbGray( 0, 0.10 ) };
|
||||||
shadow.tooltip = qMakePair( QskShadowMetrics( 0, 8, QPointF( 0, 4 ) ), QskRgb::toTransparentF( 0xff000000, 0.14 ) );
|
shadow.tooltip = { QskShadowMetrics( 0, 8, QPointF( 0, 4 ) ), rgbGray( 0, 0.14 ) };
|
||||||
shadow.flyout = qMakePair( QskShadowMetrics( 0, 16, QPointF( 0, 8 ) ), QskRgb::toTransparentF( 0xff000000, 0.14 ) );
|
shadow.flyout = { QskShadowMetrics( 0, 16, QPointF( 0, 8 ) ), rgbGray( 0, 0.14 ) };
|
||||||
// ### should actually be drawn twice with different values:
|
// ### should actually be drawn twice with different values:
|
||||||
shadow.dialog = qMakePair( QskShadowMetrics( 0, 21, QPointF( 0, 2 ) ), QskRgb::toTransparentF( 0xff000000, 0.1474 ) );
|
shadow.dialog = { QskShadowMetrics( 0, 21, QPointF( 0, 2 ) ), rgbGray( 0, 0.1474 ) };
|
||||||
}
|
}
|
||||||
else if( theme == Dark )
|
else if( theme == Dark )
|
||||||
{
|
{
|
||||||
// Fill color:
|
// Fill color:
|
||||||
|
|
||||||
palette.fillColor.text.primary = 0xffffffff;
|
palette.fillColor.text.primary = rgbGray( 255 );
|
||||||
palette.fillColor.text.secondary = QskRgb::toTransparentF( 0xffffffff, 0.786 );
|
palette.fillColor.text.secondary = rgbGray( 255, 0.786 );
|
||||||
palette.fillColor.text.tertiary = QskRgb::toTransparentF( 0xffffffff, 0.5442 );
|
palette.fillColor.text.tertiary = rgbGray( 255, 0.5442 );
|
||||||
palette.fillColor.text.disabled = QskRgb::toTransparentF( 0xffffffff, 0.3628 );
|
palette.fillColor.text.disabled = rgbGray( 255, 0.3628 );
|
||||||
|
|
||||||
palette.fillColor.accentText.primary = accentColors[ AccentLight3 ];
|
palette.fillColor.accentText.primary = accentColors[ AccentLight3 ];
|
||||||
palette.fillColor.accentText.secondary = accentColors[ AccentLight3 ];
|
palette.fillColor.accentText.secondary = accentColors[ AccentLight3 ];
|
||||||
palette.fillColor.accentText.tertiary = accentColors[ AccentLight2 ];
|
palette.fillColor.accentText.tertiary = accentColors[ AccentLight2 ];
|
||||||
palette.fillColor.accentText.disabled = QskRgb::toTransparentF( 0xffffffff, 0.3628 );
|
palette.fillColor.accentText.disabled = rgbGray( 255, 0.3628 );
|
||||||
|
|
||||||
palette.fillColor.textOnAccent.primary = 0xff000000;
|
palette.fillColor.textOnAccent.primary = rgbGray( 0 );
|
||||||
palette.fillColor.textOnAccent.secondary = QskRgb::toTransparentF( 0xff000000, 0.50 );
|
palette.fillColor.textOnAccent.secondary = rgbGray( 0, 0.50 );
|
||||||
palette.fillColor.textOnAccent.disabled = QskRgb::toTransparentF( 0xffffffff, 0.5302 );
|
palette.fillColor.textOnAccent.disabled = rgbGray( 255, 0.5302 );
|
||||||
palette.fillColor.textOnAccent.selectedText = 0xffffffff;
|
palette.fillColor.textOnAccent.selectedText = rgbGray( 255 );
|
||||||
|
|
||||||
palette.fillColor.control.transparent = Qt::transparent;
|
palette.fillColor.control.transparent = Qt::transparent;
|
||||||
palette.fillColor.control.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.0605 );
|
palette.fillColor.control.defaultColor = rgbGray( 255, 0.0605 );
|
||||||
palette.fillColor.control.secondary = QskRgb::toTransparentF( 0xffffffff, 0.0837 );
|
palette.fillColor.control.secondary = rgbGray( 255, 0.0837 );
|
||||||
palette.fillColor.control.tertiary = QskRgb::toTransparentF( 0xffffffff, 0.0326 );
|
palette.fillColor.control.tertiary = rgbGray( 255, 0.0326 );
|
||||||
palette.fillColor.control.inputActive = QskRgb::toTransparentF( 0xff1E1E1E, 0.70 );
|
palette.fillColor.control.inputActive = rgbGray( 30, 0.70 );
|
||||||
palette.fillColor.control.disabled = QskRgb::toTransparentF( 0xffffffff, 0.0419 );
|
palette.fillColor.control.disabled = rgbGray( 255, 0.0419 );
|
||||||
|
|
||||||
palette.fillColor.controlStrong.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.5442 );
|
palette.fillColor.controlStrong.defaultColor = rgbGray( 255, 0.5442 );
|
||||||
palette.fillColor.controlStrong.disabled = QskRgb::toTransparentF( 0xffffffff, 0.2465 );
|
palette.fillColor.controlStrong.disabled = rgbGray( 255, 0.2465 );
|
||||||
|
|
||||||
palette.fillColor.subtle.transparent = Qt::transparent;
|
palette.fillColor.subtle.transparent = Qt::transparent;
|
||||||
palette.fillColor.subtle.secondary =QskRgb::toTransparentF( 0xffffffff, 0.0605 );
|
palette.fillColor.subtle.secondary = rgbGray( 255, 0.0605 );
|
||||||
palette.fillColor.subtle.tertiary = QskRgb::toTransparentF( 0xffffffff, 0.0419 );
|
palette.fillColor.subtle.tertiary = rgbGray( 255, 0.0419 );
|
||||||
palette.fillColor.subtle.disabled = Qt::transparent;
|
palette.fillColor.subtle.disabled = Qt::transparent;
|
||||||
|
|
||||||
palette.fillColor.controlSolid.defaultColor = 0xff454545;
|
palette.fillColor.controlSolid.defaultColor = rgbGray( 69 );
|
||||||
|
|
||||||
palette.fillColor.controlAlt.transparent = Qt::transparent;
|
palette.fillColor.controlAlt.transparent = Qt::transparent;
|
||||||
palette.fillColor.controlAlt.secondary = QskRgb::toTransparentF( 0xff000000, 0.10 );
|
palette.fillColor.controlAlt.secondary = rgbGray( 0, 0.10 );
|
||||||
palette.fillColor.controlAlt.tertiary = QskRgb::toTransparentF( 0xffffffff, 0.0419 );
|
palette.fillColor.controlAlt.tertiary = rgbGray( 255, 0.0419 );
|
||||||
palette.fillColor.controlAlt.quaternary = QskRgb::toTransparentF( 0xffffffff, 0.0698 );
|
palette.fillColor.controlAlt.quaternary = rgbGray( 255, 0.0698 );
|
||||||
palette.fillColor.controlAlt.disabled = Qt::transparent;
|
palette.fillColor.controlAlt.disabled = Qt::transparent;
|
||||||
|
|
||||||
palette.fillColor.accent.defaultColor = accentColors[ AccentLight2 ];
|
palette.fillColor.accent.defaultColor = accentColors[ AccentLight2 ];
|
||||||
palette.fillColor.accent.secondary = QskRgb::toTransparentF( accentColors[ AccentLight2 ], 0.90 );
|
palette.fillColor.accent.secondary = QskRgb::toTransparentF( accentColors[ AccentLight2 ], 0.90 );
|
||||||
palette.fillColor.accent.tertiary = QskRgb::toTransparentF( accentColors[ AccentLight2 ], 0.80 );
|
palette.fillColor.accent.tertiary = QskRgb::toTransparentF( accentColors[ AccentLight2 ], 0.80 );
|
||||||
palette.fillColor.accent.disabled = QskRgb::toTransparentF( 0xffffffff, 0.1581 );
|
palette.fillColor.accent.disabled = rgbGray( 255, 0.1581 );
|
||||||
palette.fillColor.accent.selectedTextBackground = accentColors[ AccentBase ];
|
palette.fillColor.accent.selectedTextBackground = accentColors[ AccentBase ];
|
||||||
|
|
||||||
palette.fillColor.system.critical = 0xffFF99A4;
|
palette.fillColor.system.critical = 0xffff99a4;
|
||||||
palette.fillColor.system.success = 0xff6CCB5F;
|
palette.fillColor.system.success = 0xff6ccb5f;
|
||||||
palette.fillColor.system.attention = 0xff60CDFF;
|
palette.fillColor.system.attention = 0xff60cdff;
|
||||||
palette.fillColor.system.caution = 0xffFCE100;
|
palette.fillColor.system.caution = 0xfffce100;
|
||||||
palette.fillColor.system.attentionBackground = QskRgb::toTransparentF( 0xffffffff, 0.0326 );
|
palette.fillColor.system.attentionBackground = rgbGray( 255, 0.0326 );
|
||||||
palette.fillColor.system.successBackground = 0xff393D1B;
|
palette.fillColor.system.successBackground = 0xff393d1b;
|
||||||
palette.fillColor.system.cautionBackground = 0xff433519;
|
palette.fillColor.system.cautionBackground = 0xff433519;
|
||||||
palette.fillColor.system.criticalBackground = 0xff442726;
|
palette.fillColor.system.criticalBackground = 0xff442726;
|
||||||
palette.fillColor.system.neutral = QskRgb::toTransparentF( 0xffffffff, 0.5442 );
|
palette.fillColor.system.neutral = rgbGray( 255, 0.5442 );
|
||||||
palette.fillColor.system.neutralBackground = QskRgb::toTransparentF( 0xffffffff, 0.0326 );
|
palette.fillColor.system.neutralBackground = rgbGray( 255, 0.0326 );
|
||||||
palette.fillColor.system.solidNeutral = 0xff9D9D9D;
|
palette.fillColor.system.solidNeutral = rgbGray( 157 );
|
||||||
palette.fillColor.system.solidAttentionBackground = 0xff2E2E2E;
|
palette.fillColor.system.solidAttentionBackground = rgbGray( 46 );
|
||||||
palette.fillColor.system.solidNeutralBackground = 0xff2E2E2E;
|
palette.fillColor.system.solidNeutralBackground = rgbGray( 46 );
|
||||||
|
|
||||||
// Elevation:
|
// Elevation:
|
||||||
|
|
||||||
palette.elevation.control.border = { QskRgb::toTransparentF( 0xffffffff, 0.093 ),
|
palette.elevation.control.border = { rgbGray( 255, 0.093 ), rgbGray( 255, 0.0698 ) };
|
||||||
QskRgb::toTransparentF( 0xffffffff, 0.0698 ) };
|
palette.elevation.circle.border = { rgbGray( 255, 0.093 ), rgbGray( 255, 0.0698 ) };
|
||||||
|
|
||||||
palette.elevation.circle.border = { QskRgb::toTransparentF( 0xffffffff, 0.093 ),
|
palette.elevation.textControl.border = { rgbGray( 255, 0.08 ), palette.fillColor.text.secondary };
|
||||||
QskRgb::toTransparentF( 0xffffffff, 0.0698 ) };
|
|
||||||
|
|
||||||
palette.elevation.textControl.border = { QskRgb::toTransparentF( 0xffffffff, 0.08 ),
|
palette.elevation.textControl.borderFocused = { rgbGray( 255, 0.08 ), rgbGray( 255, 0.08 ) };
|
||||||
palette.fillColor.text.secondary };
|
palette.elevation.accentControl.border = { rgbGray( 255, 0.08 ), rgbGray( 0, 0.14 ) };
|
||||||
|
|
||||||
|
|
||||||
palette.elevation.textControl.borderFocused = { QskRgb::toTransparentF( 0xffffffff, 0.08 ),
|
|
||||||
QskRgb::toTransparentF( 0xffffffff, 0.08 ) };
|
|
||||||
|
|
||||||
palette.elevation.accentControl.border = { QskRgb::toTransparentF( 0xffffffff, 0.08 ),
|
|
||||||
QskRgb::toTransparentF( 0xff000000, 0.14 ) };
|
|
||||||
|
|
||||||
// Stroke color:
|
// Stroke color:
|
||||||
|
|
||||||
palette.strokeColor.controlStroke.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.0698 );
|
palette.strokeColor.controlStroke.defaultColor = rgbGray( 255, 0.0698 );
|
||||||
palette.strokeColor.controlStroke.secondary = QskRgb::toTransparentF( 0xffffffff, 0.093 );
|
palette.strokeColor.controlStroke.secondary = rgbGray( 255, 0.093 );
|
||||||
palette.strokeColor.controlStroke.onAccentDefault = QskRgb::toTransparentF( 0xffffffff, 0.08 );
|
palette.strokeColor.controlStroke.onAccentDefault = rgbGray( 255, 0.08 );
|
||||||
palette.strokeColor.controlStroke.onAccentSecondary = QskRgb::toTransparentF( 0xff000000, 0.14 );
|
palette.strokeColor.controlStroke.onAccentSecondary = rgbGray( 0, 0.14 );
|
||||||
palette.strokeColor.controlStroke.onAccentTertiary = QskRgb::toTransparentF( 0xff000000, 0.2169 );
|
palette.strokeColor.controlStroke.onAccentTertiary = rgbGray( 0, 0.2169 );
|
||||||
palette.strokeColor.controlStroke.onAccentDisabled = QskRgb::toTransparentF( 0xff000000, 0.20 );
|
palette.strokeColor.controlStroke.onAccentDisabled = rgbGray( 0, 0.20 );
|
||||||
palette.strokeColor.controlStroke.forStrongFillWhenOnImage = QskRgb::toTransparentF( 0xff000000, 0.42 );
|
palette.strokeColor.controlStroke.forStrongFillWhenOnImage = rgbGray( 0, 0.42 );
|
||||||
|
|
||||||
palette.strokeColor.controlStrongStroke.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.5442 );
|
palette.strokeColor.controlStrongStroke.defaultColor = rgbGray( 255, 0.5442 );
|
||||||
palette.strokeColor.controlStrongStroke.disabled = QskRgb::toTransparentF( 0xffffffff, 0.1581 );
|
palette.strokeColor.controlStrongStroke.disabled = rgbGray( 255, 0.1581 );
|
||||||
|
|
||||||
palette.strokeColor.cardStroke.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.0578 );
|
palette.strokeColor.cardStroke.defaultColor = rgbGray( 255, 0.0578 );
|
||||||
palette.strokeColor.cardStroke.defaultSolid = 0xffEBEBEB;
|
palette.strokeColor.cardStroke.defaultSolid = rgbGray( 235 );
|
||||||
|
|
||||||
palette.strokeColor.dividerStroke.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.0837 );
|
palette.strokeColor.dividerStroke.defaultColor = rgbGray( 255, 0.0837 );
|
||||||
|
|
||||||
palette.strokeColor.surfaceStroke.defaultColor = QskRgb::toTransparentF( 0xff757575, 0.40 );
|
palette.strokeColor.surfaceStroke.defaultColor = rgbGray( 117, 0.40 );
|
||||||
palette.strokeColor.surfaceStroke.flyout = QskRgb::toTransparentF( 0xff000000, 0.20 );
|
palette.strokeColor.surfaceStroke.flyout = rgbGray( 0, 0.20 );
|
||||||
|
|
||||||
palette.strokeColor.focusStroke.outer = 0xffffffff;
|
palette.strokeColor.focusStroke.outer = rgbGray( 255 );
|
||||||
palette.strokeColor.focusStroke.inner = QskRgb::toTransparentF( 0xff000000, 0.70 );
|
palette.strokeColor.focusStroke.inner = rgbGray( 0, 0.70 );
|
||||||
|
|
||||||
// Background:
|
// Background:
|
||||||
|
|
||||||
palette.background.fillColor.cardBackground.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.0512 );
|
palette.background.fillColor.cardBackground.defaultColor = rgbGray( 255, 0.0512 );
|
||||||
palette.background.fillColor.cardBackground.secondary = QskRgb::toTransparentF( 0xffffffff, 0.0326 );
|
palette.background.fillColor.cardBackground.secondary = rgbGray( 255, 0.0326 );
|
||||||
palette.background.fillColor.cardBackground.tertiary = 0xffffffff; // not set in Figma
|
palette.background.fillColor.cardBackground.tertiary = rgbGray( 255 ); // not set in Figma
|
||||||
|
|
||||||
palette.background.fillColor.smoke.defaultColor = QskRgb::toTransparentF( 0xff000000, 0.30 );
|
palette.background.fillColor.smoke.defaultColor = rgbGray( 0, 0.30 );
|
||||||
|
|
||||||
palette.background.fillColor.layer.defaultColor = QskRgb::toTransparentF( 0xff3A3A3A, 0.30 );
|
palette.background.fillColor.layer.defaultColor = rgbGray( 58, 0.30 );
|
||||||
palette.background.fillColor.layer.alt = QskRgb::toTransparentF( 0xffffffff, 0.0538 );
|
palette.background.fillColor.layer.alt = rgbGray( 255, 0.0538 );
|
||||||
|
|
||||||
palette.background.fillColor.layerOnAcrylic.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.0359 );
|
palette.background.fillColor.layerOnAcrylic.defaultColor = rgbGray( 255, 0.0359 );
|
||||||
|
|
||||||
palette.background.fillColor.layerOnAccentAcrylic.defaultColor = QskRgb::toTransparentF( 0xffffffff, 0.0359 );
|
palette.background.fillColor.layerOnAccentAcrylic.defaultColor = rgbGray( 255, 0.0359 );
|
||||||
|
|
||||||
palette.background.fillColor.acrylicBackground.defaultColor = QskRgb::toTransparentF( 0xff2C2C2C, 0.96 );
|
palette.background.fillColor.acrylicBackground.defaultColor = rgbGray( 44, 0.96 );
|
||||||
palette.background.fillColor.acrylicBackground.base = QskRgb::toTransparentF( 0xff202020, 0.90 );
|
palette.background.fillColor.acrylicBackground.base = rgbGray( 32, 0.90 );
|
||||||
|
|
||||||
palette.background.fillColor.accentAcrylicBackground.base = QskRgb::toTransparentF( accentColors[ AccentDark2 ], 0.80 );
|
palette.background.fillColor.accentAcrylicBackground.base = QskRgb::toTransparentF( accentColors[ AccentDark2 ], 0.80 );
|
||||||
palette.background.fillColor.accentAcrylicBackground.defaultColor = QskRgb::toTransparentF( accentColors[ AccentBase ], 0.80 );
|
palette.background.fillColor.accentAcrylicBackground.defaultColor = QskRgb::toTransparentF( accentColors[ AccentBase ], 0.80 );
|
||||||
|
|
||||||
palette.background.fillColor.micaBackground.base = QskRgb::toTransparentF( 0xffffffff, 0.50 );
|
palette.background.fillColor.micaBackground.base = rgbGray( 255, 0.50 );
|
||||||
|
|
||||||
palette.background.fillColor.solidBackground.base = 0xff202020;
|
palette.background.fillColor.solidBackground.base = rgbGray( 32 );
|
||||||
palette.background.fillColor.solidBackground.secondary = 0xff1C1C1C;
|
palette.background.fillColor.solidBackground.secondary = rgbGray( 28 );
|
||||||
palette.background.fillColor.solidBackground.tertiary = 0xff282828;
|
palette.background.fillColor.solidBackground.tertiary = rgbGray( 40 );
|
||||||
palette.background.fillColor.solidBackground.quaternary = 0xff2C2C2C;
|
palette.background.fillColor.solidBackground.quaternary = rgbGray( 44 );
|
||||||
|
|
||||||
|
|
||||||
// Shadow:
|
// Shadow:
|
||||||
|
|
||||||
shadow.cardRest = qMakePair( QskShadowMetrics( 0, 4, QPointF( 0, 2 ) ), QskRgb::toTransparentF( 0xff000000, 0.13 ) );
|
shadow.cardRest = { QskShadowMetrics( 0, 4, QPointF( 0, 2 ) ), rgbGray( 0, 0.13 ) };
|
||||||
shadow.cardHover = qMakePair( QskShadowMetrics( 0, 4, QPointF( 0, 2 ) ), QskRgb::toTransparentF( 0xff000000, 0.26 ) );
|
shadow.cardHover = { QskShadowMetrics( 0, 4, QPointF( 0, 2 ) ), rgbGray( 0, 0.26 ) };
|
||||||
shadow.tooltip = qMakePair( QskShadowMetrics( 0, 8, QPointF( 0, 4 ) ), QskRgb::toTransparentF( 0xff000000, 0.26 ) );
|
shadow.tooltip = { QskShadowMetrics( 0, 8, QPointF( 0, 4 ) ), rgbGray( 0, 0.26 ) };
|
||||||
shadow.flyout = qMakePair( QskShadowMetrics( 0, 16, QPointF( 0, 8 ) ), QskRgb::toTransparentF( 0xff000000, 0.26 ) );
|
shadow.flyout = { QskShadowMetrics( 0, 16, QPointF( 0, 8 ) ), rgbGray( 0, 0.26 ) };
|
||||||
// ### should actually be drawn twice with different values:
|
// ### should actually be drawn twice with different values:
|
||||||
shadow.dialog = qMakePair( QskShadowMetrics( 0, 21, QPointF( 0, 2 ) ), QskRgb::toTransparentF( 0xff000000, 0.37 ) );
|
shadow.dialog = { QskShadowMetrics( 0, 21, QPointF( 0, 2 ) ), rgbGray( 0, 0.37 ) };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class QSK_FLUENT2_EXPORT QskFluent2Theme
|
|||||||
};
|
};
|
||||||
|
|
||||||
QskFluent2Theme( Theme );
|
QskFluent2Theme( Theme );
|
||||||
QskFluent2Theme( Theme, std::array< QRgb, NumAccentColors > );
|
QskFluent2Theme( Theme, const std::array< QRgb, NumAccentColors >& );
|
||||||
|
|
||||||
typedef std::array< QRgb, 2 > BorderGradient;
|
typedef std::array< QRgb, 2 > BorderGradient;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user