diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp index 0163adc..577903b 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp @@ -42,7 +42,7 @@ #include "HTMLInputElement.h" #include "HTMLMediaElement.h" #include "HTMLNames.h" -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) #include "Maemo5Webstyle.h" #endif #include "NotImplemented.h" @@ -153,7 +153,7 @@ RenderThemeQt::RenderThemeQt(Page* page) m_buttonFontPixelSize = fontInfo.pixelSize(); #endif -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) m_fallbackStyle = new Maemo5WebStyle; #else m_fallbackStyle = QStyleFactory::create(QLatin1String("windows")); @@ -166,7 +166,7 @@ RenderThemeQt::~RenderThemeQt() delete m_lineEdit; } -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) bool RenderThemeQt::isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& fill, const Color& backgroundColor) const { switch (style->appearance()) { @@ -198,7 +198,7 @@ QStyle* RenderThemeQt::fallbackStyle() const QStyle* RenderThemeQt::qStyle() const { -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) return fallbackStyle(); #endif @@ -218,7 +218,7 @@ String RenderThemeQt::extraDefaultStyleSheet() #if ENABLE(NO_LISTBOX_RENDERING) result += String(themeQtNoListboxesUserAgentStyleSheet, sizeof(themeQtNoListboxesUserAgentStyleSheet)); #endif -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) result += String(themeQtMaemo5UserAgentStyleSheet, sizeof(themeQtMaemo5UserAgentStyleSheet)); #endif return result; @@ -648,7 +648,9 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const { -#ifndef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) + // Mobile theme uses border radius. +#else // WORKAROUND because html.css specifies -webkit-border-radius for <select> so we override it here // see also http://bugs.webkit.org/show_bug.cgi?id=18399 style->resetBorderRadius(); @@ -870,7 +872,7 @@ bool RenderThemeQt::supportsFocus(ControlPart appearance) const void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const { -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) static QPalette lightGrayPalette(Qt::lightGray); palette = lightGrayPalette; return; @@ -932,7 +934,7 @@ ControlPart RenderThemeQt::initializeCommonQStyleOptions(QStyleOption& option, R case SearchFieldCancelButtonPart: { if (isPressed(o)) option.state |= QStyle::State_Sunken; - else if (result == PushButtonPart) + else if (result == PushButtonPart || result == ButtonPart) option.state |= QStyle::State_Raised; break; } |