2011-01-07 Jan Erik Hanssen <jhanssen@sencha.com>

        Reviewed by Andreas Kling.

        [Qt] Black text on black buttons using a dark theme
        https://bugs.webkit.org/show_bug.cgi?id=35024

        Implement RenderThemeQt::systemColor to apply the correct colors from the current Qt style.

        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::systemColor):
        * platform/qt/RenderThemeQt.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 02f6410b
2011-01-07 Jan Erik Hanssen <jhanssen@sencha.com>
Reviewed by Andreas Kling.
[Qt] Black text on black buttons using a dark theme
https://bugs.webkit.org/show_bug.cgi?id=35024
Implement RenderThemeQt::systemColor to apply the correct colors from the current Qt style.
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::systemColor):
* platform/qt/RenderThemeQt.h:
2011-01-05 Adrienne Walker <enne@google.com>
Reviewed by Kenneth Russell.
......
......@@ -32,6 +32,7 @@
#include "CSSStyleSelector.h"
#include "CSSStyleSheet.h"
#include "CSSValueKeywords.h"
#include "Chrome.h"
#include "ChromeClientQt.h"
#include "Color.h"
......@@ -385,6 +386,19 @@ void RenderThemeQt::systemFont(int, FontDescription&) const
// no-op
}
Color RenderThemeQt::systemColor(int cssValueId) const
{
QPalette pal = QApplication::palette();
switch (cssValueId) {
case CSSValueButtontext:
return pal.brush(QPalette::Active, QPalette::ButtonText).color();
case CSSValueCaptiontext:
return pal.brush(QPalette::Active, QPalette::Text).color();
default:
return RenderTheme::systemColor(cssValueId);
}
}
int RenderThemeQt::minimumMenuListSize(RenderStyle*) const
{
const QFontMetrics &fm = QApplication::fontMetrics();
......
......@@ -73,6 +73,7 @@ public:
virtual Color platformFocusRingColor() const;
virtual void systemFont(int propId, FontDescription&) const;
virtual Color systemColor(int cssValueId) const;
virtual int minimumMenuListSize(RenderStyle*) const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment