Changeset 65074 in webkit


Ignore:
Timestamp:
Aug 10, 2010 9:43:37 AM (14 years ago)
Author:
kov@webkit.org
Message:

2010-08-10 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>

Reviewed by Xan Lopez.

[GTK] Inputs of type 'search' have weird looking checkboxes instead of search/clear icons
https://bugs.webkit.org/show_bug.cgi?id=43760

Draw appropriate GTK+ stock images for search/clear icons in search entries.

  • platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::paintSearchFieldResultsButton): (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration): (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r65073 r65074  
     12010-08-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] Inputs of type 'search' have weird looking checkboxes instead of search/clear icons
     6        https://bugs.webkit.org/show_bug.cgi?id=43760
     7
     8        Draw appropriate GTK+ stock images for search/clear icons in search entries.
     9
     10        * platform/gtk/RenderThemeGtk.cpp:
     11        (WebCore::RenderThemeGtk::paintSearchFieldResultsButton):
     12        (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
     13        (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
     14
    1152010-08-10  Pavel Feldman  <pfeldman@chromium.org>
    216
  • trunk/WebCore/platform/gtk/RenderThemeGtk.cpp

    r63214 r65074  
    486486bool RenderThemeGtk::paintSearchFieldResultsButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
    487487{
    488     return paintMozillaGtkWidget(this, MOZ_GTK_DROPDOWN_ARROW, o, i, rect);
     488    return paintSearchFieldResultsDecoration(o, i, rect);
    489489}
    490490
     
    502502bool RenderThemeGtk::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo& i, const IntRect& rect)
    503503{
    504     return paintMozillaGtkWidget(this, MOZ_GTK_CHECKMENUITEM, o, i, rect);
     504    GraphicsContext* context = i.context;
     505
     506    static Image* searchImage = Image::loadPlatformThemeIcon(GTK_STOCK_FIND, rect.width()).releaseRef();
     507    context->drawImage(searchImage, DeviceColorSpace, rect);
     508
     509    return false;
    505510}
    506511
     
    518523bool RenderThemeGtk::paintSearchFieldCancelButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
    519524{
    520     return paintMozillaGtkWidget(this, MOZ_GTK_CHECKMENUITEM, o, i, rect);
     525    GraphicsContext* context = i.context;
     526
     527    // TODO: Brightening up the image on hover is desirable here, I believe.
     528    static Image* cancelImage = Image::loadPlatformThemeIcon(GTK_STOCK_CLEAR, rect.width()).releaseRef();
     529    context->drawImage(cancelImage, DeviceColorSpace, rect);
     530
     531    return false;
    521532}
    522533
Note: See TracChangeset for help on using the changeset viewer.