summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/qt/RenderThemeQStyle.cpp')
-rw-r--r--Source/WebCore/platform/qt/RenderThemeQStyle.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
index edc252d1d..b9c6953fa 100644
--- a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
+++ b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
@@ -191,25 +191,21 @@ template<typename T>
static void inflateCheckBoxRectImpl(T& originalRect, const QRect& rect)
{
if (!rect.isNull()) {
- if (rect.width() > originalRect.width()) {
- int dx = static_cast<int>((rect.width() - originalRect.width()) / 2);
- originalRect.setX(originalRect.x() - dx);
- originalRect.setWidth(rect.width());
- }
- if (rect.height() > originalRect.height()) {
- int dy = static_cast<int>((rect.height() - originalRect.height()) / 2);
- originalRect.setY(originalRect.y() - dy);
- originalRect.setHeight(rect.height());
- }
+ int dx = static_cast<int>((rect.width() - originalRect.width()) / 2);
+ originalRect.setX(originalRect.x() - dx);
+ originalRect.setWidth(rect.width());
+ int dy = static_cast<int>((rect.height() - originalRect.height()) / 2);
+ originalRect.setY(originalRect.y() - dy);
+ originalRect.setHeight(rect.height());
}
}
-void RenderThemeQStyle::inflateControlRect(QStyleFacade::ButtonType part, QRect& originalRect) const
+void RenderThemeQStyle::computeControlRect(QStyleFacade::ButtonType part, QRect& originalRect) const
{
inflateCheckBoxRectImpl(originalRect, indicatorRect(part, originalRect));
}
-void RenderThemeQStyle::inflateControlRect(QStyleFacade::ButtonType part, FloatRect& originalRect) const
+void RenderThemeQStyle::computeControlRect(QStyleFacade::ButtonType part, FloatRect& originalRect) const
{
inflateCheckBoxRectImpl(originalRect, indicatorRect(part, enclosingIntRect(originalRect)));
}
@@ -369,10 +365,10 @@ bool RenderThemeQStyle::paintButton(const RenderObject& o, const PaintInfo& i, c
p.styleOption.rect = inflateButtonRect(p.styleOption.rect);
p.paintButton(QStyleFacade::PushButton);
} else if (p.appearance == RadioPart) {
- inflateControlRect(QStyleFacade::RadioButton, p.styleOption.rect);
+ computeControlRect(QStyleFacade::RadioButton, p.styleOption.rect);
p.paintButton(QStyleFacade::RadioButton);
} else if (p.appearance == CheckboxPart) {
- inflateControlRect(QStyleFacade::CheckBox, p.styleOption.rect);
+ computeControlRect(QStyleFacade::CheckBox, p.styleOption.rect);
p.paintButton(QStyleFacade::CheckBox);
}