Changeset 150909 in webkit


Ignore:
Timestamp:
May 29, 2013 10:47:26 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Radio Button UX updates.
https://bugs.webkit.org/show_bug.cgi?id=116881

Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-05-29
Reviewed by Rob Buis.

BlackBerry PR 342322.
Internally Reviewed by Jeff Rogers.
Change images.

  • platform/blackberry/RenderThemeBlackBerry.cpp:

(WebCore::RenderThemeBlackBerry::paintRadio):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r150908 r150909  
     12013-05-29  Tiancheng Jiang  <tijiang@rim.com>
     2
     3        [BlackBerry] Radio Button UX updates.
     4        https://bugs.webkit.org/show_bug.cgi?id=116881
     5
     6        Reviewed by Rob Buis.
     7
     8        BlackBerry PR 342322.
     9        Internally Reviewed by Jeff Rogers.
     10        Change images.
     11
     12        * platform/blackberry/RenderThemeBlackBerry.cpp:
     13        (WebCore::RenderThemeBlackBerry::paintRadio):
     14
    1152013-05-29  Tiancheng Jiang  <tijiang@rim.com>
    216
  • trunk/Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp

    r150769 r150909  
    497497    GraphicsContext* context = info.context;
    498498
    499     static RefPtr<Image> disabled, disabledActive, inactive, pressed, active, activeMark;
     499    static RefPtr<Image> disabled, disabledDot, inactive, pressed, active, activeDot, pressedDot;
    500500    if (!disabled) {
    501501        disabled = loadImage("core_radiobutton_disabled");
    502         disabledActive = loadImage("core_radiobutton_disabled_active");
     502        disabledDot = loadImage("core_radiobutton_dot_disabled");
    503503        inactive = loadImage("core_radiobutton_inactive");
    504504        pressed = loadImage("core_radiobutton_pressed");
    505505        active = loadImage("core_radiobutton_active");
    506         activeMark = loadImage("core_radiobutton_active_mark");
     506        activeDot = loadImage("core_radiobutton_dot_selected");
     507        pressedDot = loadImage("core_radiobutton_dot_pressed");
    507508    }
    508509
     
    510511    FloatRect tmpRect(rect);
    511512
    512     float centerX = ((float(inactive->width()) - float(activeMark->width())) / float(inactive->width()) * tmpRect.width() / 2)+ tmpRect.x();
    513     float centerY = ((float(inactive->height()) - float(activeMark->height())) / float(inactive->height()) * tmpRect.height() / 2) + tmpRect.y();
    514     float width = float(activeMark->width()) / float(inactive->width()) * tmpRect.width();
    515     float height = float(activeMark->height()) / float(inactive->height()) * tmpRect.height();
     513    float centerX = ((float(inactive->width()) - float(activeDot->width())) / float(inactive->width()) * tmpRect.width() / 2)+ tmpRect.x();
     514    float centerY = ((float(inactive->height()) - float(activeDot->height())) / float(inactive->height()) * tmpRect.height() / 2) + tmpRect.y();
     515    float width = float(activeDot->width()) / float(inactive->width()) * tmpRect.width();
     516    float height = float(activeDot->height()) / float(inactive->height()) * tmpRect.height();
    516517    FloatRect centerRect(centerX, centerY, width, height);
    517518
     
    519520        if (isPressed(object)) {
    520521            drawControl(context, rect, pressed.get());
    521             if (isChecked(object)) {
    522                 // FIXME: need opacity 30% on activeMark
    523                 drawControl(context, centerRect, activeMark.get());
    524             }
     522            if (isChecked(object))
     523                drawControl(context, centerRect, pressedDot.get());
    525524        } else {
    526525            drawControl(context, rect, inactive.get());
    527526            if (isChecked(object)) {
    528527                drawControl(context, rect, active.get());
    529                 drawControl(context, centerRect, activeMark.get());
     528                drawControl(context, centerRect, activeDot.get());
    530529            }
    531530        }
    532531    } else {
    533         drawControl(context, rect, inactive.get());
     532        drawControl(context, rect, disabled.get());
    534533        if (isChecked(object))
    535             drawControl(context, rect, disabledActive.get());
    536         else
    537             drawControl(context, rect, disabled.get());
     534            drawControl(context, rect, disabledDot.get());
    538535    }
    539536    return false;
Note: See TracChangeset for help on using the changeset viewer.