summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/widgets/qcommandlinkbutton.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/widgets/qcommandlinkbutton.cpp b/src/widgets/widgets/qcommandlinkbutton.cpp
index 5a82e63f44..2c59e78c1a 100644
--- a/src/widgets/widgets/qcommandlinkbutton.cpp
+++ b/src/widgets/widgets/qcommandlinkbutton.cpp
@@ -171,7 +171,7 @@ bool QCommandLinkButtonPrivate::usingVistaStyle() const
Q_Q(const QCommandLinkButton);
//### This is a hack to detect if we are indeed running Vista style themed and not in classic
// When we add api to query for this, we should change this implementation to use it.
- return q->style()->inherits("QWindowsVistaStyle")
+ return q->property("_qt_usingVistaStyle").toBool()
&& q->style()->pixelMetric(QStyle::PM_ButtonShiftHorizontal, nullptr) == 0;
}
@@ -339,9 +339,9 @@ void QCommandLinkButton::paintEvent(QPaintEvent *)
//Draw title
QColor textColor = palette().buttonText().color();
if (isEnabled() && d->usingVistaStyle()) {
- textColor = QColor(21, 28, 85);
+ textColor = option.palette.buttonText().color();
if (underMouse() && !isDown())
- textColor = QColor(7, 64, 229);
+ textColor = option.palette.brightText().color();
//A simple text color transition
d->currentColor = d->mergedColors(textColor, d->currentColor, 60);
option.palette.setColor(QPalette::ButtonText, d->currentColor);