From 6b0bbce035dfc22c770759aec60fe02d23c505ad Mon Sep 17 00:00:00 2001 From: megabigbug Date: Sun, 4 Jul 2010 12:41:49 +0200 Subject: apply the hack for dark color schemes only if the button text color is too light --- src/webview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/webview.cpp b/src/webview.cpp index 9bbd45fc..188216f8 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -85,7 +85,7 @@ WebView::WebView(QWidget* parent) // // But it doesn't work :( // // We'll see in next KDE releases... QPalette p; - if (p.color(QPalette::Window) != Qt::white) { + if (p.color(QPalette::ButtonText).lightness() > 50) { //if it is a dark theme QWindowsStyle s; p = s.standardPalette(); setPalette(p); -- cgit v1.2.1