Changeset 94419 in webkit
- Timestamp:
- Sep 2, 2011 8:57:44 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r94418 r94419 1 2011-09-02 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt] number input not rendering spin buttons properly in RTL direction 4 https://bugs.webkit.org/show_bug.cgi?id=67445 5 6 New baseline for Qt number input with RTL direction. 7 8 Reviewed by Andreas Kling. 9 10 * platform/qt/fast/forms/input-appearance-number-rtl-expected.png: 11 1 12 2011-09-02 Arko Saha <nghq36@motorola.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r94418 r94419 1 2011-09-02 Jarred Nicholls <jarred@sencha.com> 2 3 [Qt] number input not rendering spin buttons properly in RTL direction 4 https://bugs.webkit.org/show_bug.cgi?id=67445 5 6 Properly render Qt's number input with RTL direction, and fix Plastique styling. 7 8 Reviewed by Andreas Kling. 9 10 * platform/qt/RenderThemeQt.cpp: 11 (WebCore::RenderThemeQt::paintInnerSpinButton): 12 1 13 2011-09-02 Arko Saha <nghq36@motorola.com> 2 14 -
trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp
r93955 r94419 77 77 #include <QMacStyle> 78 78 #include <QPainter> 79 #include <QPlastiqueStyle> 79 80 #include <QPushButton> 80 81 #include <QStyleFactory> … … 1099 1100 } 1100 1101 } 1102 // Render the spin buttons for LTR or RTL accordingly. 1103 option.direction = o->style()->isLeftToRightDirection() ? Qt::LeftToRight : Qt::RightToLeft; 1101 1104 1102 1105 IntRect buttonRect = rect; 1103 buttonRect.inflateY(-2); 1106 // Default to moving the buttons a little bit within the editor frame. 1107 int inflateX = -2; 1108 int inflateY = -2; 1104 1109 #if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC) 1105 1110 // QMacStyle will position the aqua buttons flush to the right. 1106 // This will move them more leftfor better style, a la1111 // This will move them more within the control for better style, a la 1107 1112 // Chromium look & feel. 1108 1113 if (qobject_cast<QMacStyle*>(p.style)) { 1109 buttonRect.inflateX(-4);1114 inflateX = -4; 1110 1115 // Render mini aqua spin buttons for QMacStyle to fit nicely into 1111 1116 // the editor area, like Chromium. 1112 1117 option.state |= QStyle::State_Mini; 1113 #else 1114 { 1115 buttonRect.inflateX(-2); 1116 #endif 1117 } 1118 } 1119 #endif 1120 #if defined(Q_WS_X11) && !defined(QT_NO_STYLE_PLASTIQUE) 1121 // QPlastiqueStyle looks best when the spin buttons are flush with the frame's edge. 1122 if (qobject_cast<QPlastiqueStyle*>(p.style)) { 1123 inflateX = 0; 1124 inflateY = 0; 1125 } 1126 #endif 1127 1128 buttonRect.inflateX(inflateX); 1129 buttonRect.inflateY(inflateY); 1118 1130 option.rect = buttonRect; 1119 1131
Note: See TracChangeset
for help on using the changeset viewer.