From 90980a54e87147ae59ed0628f8b1de67d98ecae4 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Date: Wed, 16 Aug 2023 13:56:29 +0200 Subject: Rename accent color in QPalette Accent color role has been renamed according to name rule of other color roles in QPalette. Fixes: QTBUG-116107 Pick-to: 6.6 Change-Id: I70ac98a1e97afbdc7ea5f8d79f808c307e170712 Reviewed-by: Mitch Curtis --- src/widgets/styles/qstylesheetstyle.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/widgets/styles') diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 4c271996c5..e3ca85d29e 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -439,13 +439,13 @@ struct QStyleSheetPaletteData : public QSharedData const QBrush &selectedBackground, const QBrush &alternateBackground, const QBrush &placeHolderTextForeground, - const QBrush &accentColor) + const QBrush &accent) : foreground(foreground) , selectionForeground(selectedForeground) , selectionBackground(selectedBackground) , alternateBackground(alternateBackground) , placeholderForeground(placeHolderTextForeground) - , accentColor(accentColor) + , accent(accent) { } QBrush foreground; @@ -453,7 +453,7 @@ struct QStyleSheetPaletteData : public QSharedData QBrush selectionBackground; QBrush alternateBackground; QBrush placeholderForeground; - QBrush accentColor; + QBrush accent; }; struct QStyleSheetGeometryData : public QSharedData @@ -970,11 +970,11 @@ QRenderRule::QRenderRule(const QList &declarations, const QObject * QBrush selectedBackground; QBrush alternateBackground; QBrush placeHolderTextForeground; - QBrush accentColor; + QBrush accent; if (v.extractPalette(&foreground, &selectedForeground, &selectedBackground, - &alternateBackground, &placeHolderTextForeground, &accentColor)) { + &alternateBackground, &placeHolderTextForeground, &accent)) { pal = new QStyleSheetPaletteData(foreground, selectedForeground, selectedBackground, - alternateBackground, placeHolderTextForeground, accentColor); + alternateBackground, placeHolderTextForeground, accent); } QIcon imgIcon; @@ -1514,8 +1514,8 @@ void QRenderRule::configurePalette(QPalette *p, QPalette::ColorGroup cg, const Q p->setBrush(cg, QPalette::AlternateBase, pal->alternateBackground); if (pal->placeholderForeground.style() != Qt::NoBrush) p->setBrush(cg, QPalette::PlaceholderText, pal->placeholderForeground); - if (pal->accentColor.style() != Qt::NoBrush) - p->setBrush(cg, QPalette::AccentColor, pal->accentColor); + if (pal->accent.style() != Qt::NoBrush) + p->setBrush(cg, QPalette::Accent, pal->accent); } bool QRenderRule::hasModification() const -- cgit v1.2.3