Changeset 83615 in webkit


Ignore:
Timestamp:
Apr 12, 2011 11:30:44 AM (13 years ago)
Author:
diegohcg@webkit.org
Message:

2011-04-12 Diego Gonzalez <diegohcg@webkit.org>

[Qt] Better padding for inputs and comboxes in mobile theme
https://bugs.webkit.org/show_bug.cgi?id=58248

Reviewed by Kenneth Rohde Christiansen.

  • platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::setButtonPadding): (WebCore::RenderThemeQt::adjustTextFieldStyle): (WebCore::RenderThemeQt::paintTextField): (WebCore::RenderThemeQt::adjustMenuListStyle):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83611 r83615  
     12011-04-12  Diego Gonzalez  <diegohcg@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Better padding for inputs and comboxes in mobile theme
     6        https://bugs.webkit.org/show_bug.cgi?id=58248
     7
     8        * platform/qt/RenderThemeQt.cpp:
     9        (WebCore::RenderThemeQt::setButtonPadding):
     10        (WebCore::RenderThemeQt::adjustTextFieldStyle):
     11        (WebCore::RenderThemeQt::paintTextField):
     12        (WebCore::RenderThemeQt::adjustMenuListStyle):
     13
    1142011-04-11  Abhishek Arya  <inferno@chromium.org>
    215
  • trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp

    r83437 r83615  
    105105static const float defaultSearchFieldResultsButtonWidth = 18;
    106106
     107#if USE(QT_MOBILE_THEME)
     108namespace {
     109    float buttonPaddingLeft = 18;
     110    float buttonPaddingRight = 18;
     111    float buttonPaddingTop = 2;
     112    float buttonPaddingBottom = 3;
     113    float menuListPadding = 9;
     114    float textFieldPadding = 5;
     115}
     116#endif
    107117
    108118StylePainter::StylePainter(RenderThemeQt* theme, const PaintInfo& paintInfo)
     
    621631    if (!style)
    622632        return;
    623     style->setPaddingLeft(Length(18, Fixed));
    624     style->setPaddingRight(Length(18, Fixed));
    625     style->setPaddingTop(Length(2, Fixed));
    626     style->setPaddingBottom(Length(3, Fixed));
     633    style->setPaddingLeft(Length(buttonPaddingLeft, Fixed));
     634    style->setPaddingRight(Length(buttonPaddingRight, Fixed));
     635    style->setPaddingTop(Length(buttonPaddingTop, Fixed));
     636    style->setPaddingBottom(Length(buttonPaddingBottom, Fixed));
    627637}
    628638#endif
     
    662672    style->resetPadding();
    663673    computeSizeBasedOnStyle(style);
     674#if USE(QT_MOBILE_THEME)
     675    style->setPaddingLeft(Length(textFieldPadding, Fixed));
     676    style->setPaddingRight(Length(textFieldPadding, Fixed));
     677#endif
    664678}
    665679
     
    692706    // Now paint the text field.
    693707    p.drawPrimitive(QStyle::PE_PanelLineEdit, panel);
    694 
    695708    return false;
    696709}
     
    720733    // Add in the padding that we'd like to use.
    721734    setPopupPadding(style);
     735#if USE(QT_MOBILE_THEME)
     736    style->setPaddingLeft(Length(menuListPadding, Fixed));
     737#endif
    722738}
    723739
Note: See TracChangeset for help on using the changeset viewer.