Changeset 150909 in webkit
- Timestamp:
- May 29, 2013 10:47:26 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r150908 r150909 1 2013-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 1 15 2013-05-29 Tiancheng Jiang <tijiang@rim.com> 2 16 -
trunk/Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp
r150769 r150909 497 497 GraphicsContext* context = info.context; 498 498 499 static RefPtr<Image> disabled, disabled Active, inactive, pressed, active, activeMark;499 static RefPtr<Image> disabled, disabledDot, inactive, pressed, active, activeDot, pressedDot; 500 500 if (!disabled) { 501 501 disabled = loadImage("core_radiobutton_disabled"); 502 disabled Active = loadImage("core_radiobutton_disabled_active");502 disabledDot = loadImage("core_radiobutton_dot_disabled"); 503 503 inactive = loadImage("core_radiobutton_inactive"); 504 504 pressed = loadImage("core_radiobutton_pressed"); 505 505 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"); 507 508 } 508 509 … … 510 511 FloatRect tmpRect(rect); 511 512 512 float centerX = ((float(inactive->width()) - float(active Mark->width())) / float(inactive->width()) * tmpRect.width() / 2)+ tmpRect.x();513 float centerY = ((float(inactive->height()) - float(active Mark->height())) / float(inactive->height()) * tmpRect.height() / 2) + tmpRect.y();514 float width = float(active Mark->width()) / float(inactive->width()) * tmpRect.width();515 float height = float(active Mark->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(); 516 517 FloatRect centerRect(centerX, centerY, width, height); 517 518 … … 519 520 if (isPressed(object)) { 520 521 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()); 525 524 } else { 526 525 drawControl(context, rect, inactive.get()); 527 526 if (isChecked(object)) { 528 527 drawControl(context, rect, active.get()); 529 drawControl(context, centerRect, active Mark.get());528 drawControl(context, centerRect, activeDot.get()); 530 529 } 531 530 } 532 531 } else { 533 drawControl(context, rect, inactive.get());532 drawControl(context, rect, disabled.get()); 534 533 if (isChecked(object)) 535 drawControl(context, rect, disabledActive.get()); 536 else 537 drawControl(context, rect, disabled.get()); 534 drawControl(context, rect, disabledDot.get()); 538 535 } 539 536 return false;
Note: See TracChangeset
for help on using the changeset viewer.