Fix message widget style on OS X

This commit is contained in:
Janek Bevendorff 2017-02-25 16:18:36 +01:00
parent 6e2254c13d
commit 84f2520924
No known key found for this signature in database
GPG Key ID: CFEC2F6850BFFA53

View File

@ -98,6 +98,12 @@ void KMessageWidgetPrivate::init(KMessageWidget *q_ptr)
closeButton = new QToolButton(content);
closeButton->setAutoRaise(true);
closeButton->setDefaultAction(closeAction);
#ifdef Q_OS_MAC
closeButton->setStyleSheet("QToolButton { background: transparent;"
"border-radius: 2px; padding: 3px; }"
"QToolButton::hover, QToolButton::focus {"
"border: 1px solid rgb(90, 200, 250); }");
#endif
q->setMessageType(KMessageWidget::Information);
}
@ -287,7 +293,11 @@ void KMessageWidget::setMessageType(KMessageWidget::MessageType type)
}
// Colors
#ifdef Q_OS_MAC
fg = palette().light().color();
#else
fg = palette().highlightedText().color();
#endif
bg0 = bg1.lighter(110);
bg2 = bg1.darker(110);
border = darkShade(bg1);