Changeset 83837 in webkit


Ignore:
Timestamp:
Apr 14, 2011 4:59:33 AM (13 years ago)
Author:
andreas.kling@nokia.com
Message:

2011-04-14 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Disabled form controls don't actually look disabled.
https://bugs.webkit.org/show_bug.cgi?id=58490

Unsetting QStyle::State_Enabled is not enough to get the "disabled" appearance
when painting controls. We must also set the QStyleOption's palette's current
color group.

  • platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::initializeCommonQStyleOptions):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83836 r83837  
     12011-04-14  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Disabled form controls don't actually look disabled.
     6        https://bugs.webkit.org/show_bug.cgi?id=58490
     7
     8        Unsetting QStyle::State_Enabled is not enough to get the "disabled" appearance
     9        when painting controls. We must also set the QStyleOption's palette's current
     10        color group.
     11
     12        * platform/qt/RenderThemeQt.cpp:
     13        (WebCore::RenderThemeQt::initializeCommonQStyleOptions):
     14
    1152011-04-14  Nancy Piedra  <nancy.piedra@nokia.com>
    216
  • trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp

    r83779 r83837  
    11121112    option.state &= ~(QStyle::State_HasFocus | QStyle::State_MouseOver);
    11131113
    1114     if (!isEnabled(o))
    1115         option.state &= ~QStyle::State_Enabled;
    1116 
    11171114    if (isReadOnlyControl(o))
    11181115        // Readonly is supported on textfields.
     
    11251122
    11261123    setPaletteFromPageClientIfExists(option.palette);
     1124
     1125    if (!isEnabled(o)) {
     1126        option.palette.setCurrentColorGroup(QPalette::Disabled);
     1127        option.state &= ~QStyle::State_Enabled;
     1128    }
     1129
    11271130    RenderStyle* style = o->style();
    11281131    if (!style)
Note: See TracChangeset for help on using the changeset viewer.