summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@digia.com>2013-04-08 14:12:43 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-17 07:43:11 +0200
commit3ae271523ff7fb951df16cfccfaf84c0aa298e16 (patch)
tree446402cb007ac348c67ea35b44baedb4f8c3681e /src/widgets
parentd42e54c8626ee0d42d4df40e8f2a83df0698190a (diff)
Move Fusion styles palette into QtGui
So that it can be used as the standard palette for QtGui applications instead of the absolutely useless black palette. Change-Id: Ie001439fcd8840a66275009c9f42cbf8bab4864a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/styles/qfusionstyle.cpp42
1 files changed, 3 insertions, 39 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index bfc22807a0..c4c964f451 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -1896,50 +1896,14 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
}
}
+extern QPalette qt_fusionPalette();
+
/*!
\reimp
*/
QPalette QFusionStyle::standardPalette () const
{
- QPalette palette = QCommonStyle::standardPalette();
- palette.setBrush(QPalette::Active, QPalette::Highlight, QColor(48, 140, 198));
- palette.setBrush(QPalette::Inactive, QPalette::Highlight, QColor(145, 141, 126));
- palette.setBrush(QPalette::Disabled, QPalette::Highlight, QColor(145, 141, 126));
-
- QColor backGround(239, 235, 231);
-
- QColor light = backGround.lighter(150);
- QColor base = Qt::white;
- QColor dark = QColor(170, 156, 143).darker(110);
- dark = backGround.darker(150);
- QColor darkDisabled = QColor(209, 200, 191).darker(110);
-
- //### Find the correct disabled text color
- palette.setBrush(QPalette::Disabled, QPalette::Text, QColor(190, 190, 190));
-
- palette.setBrush(QPalette::Window, backGround);
- palette.setBrush(QPalette::Mid, backGround.darker(130));
- palette.setBrush(QPalette::Light, light);
-
- palette.setBrush(QPalette::Active, QPalette::Base, base);
- palette.setBrush(QPalette::Inactive, QPalette::Base, base);
- palette.setBrush(QPalette::Disabled, QPalette::Base, backGround);
-
- palette.setBrush(QPalette::Midlight, palette.mid().color().lighter(110));
-
- palette.setBrush(QPalette::All, QPalette::Dark, dark);
- palette.setBrush(QPalette::Disabled, QPalette::Dark, darkDisabled);
-
- QColor button = backGround;
-
- palette.setBrush(QPalette::Button, button);
-
- QColor shadow = dark.darker(135);
- palette.setBrush(QPalette::Shadow, shadow);
- palette.setBrush(QPalette::Disabled, QPalette::Shadow, shadow.lighter(150));
- palette.setBrush(QPalette::HighlightedText, QColor(QRgb(0xffffffff)));
-
- return palette;
+ return qt_fusionPalette();
}
/*!