Commit 969cac2f authored by diegohcg@webkit.org's avatar diegohcg@webkit.org

2011-04-02 Diego Gonzalez <diegohcg@webkit.org>

    [Qt] Radio buttons are showing wrong with mobile theme
    https://bugs.webkit.org/show_bug.cgi?id=57706

    Reviewed by Csaba Osztrogonác.

    * platform/qt/QtMobileWebStyle.cpp:
    (QtMobileWebStyle::drawRadio):

git-svn-id: svn://svn.chromium.org/blink/trunk@83043 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 594bf833
2011-04-02 Diego Gonzalez <diegohcg@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt] Radio buttons are showing wrong with mobile theme
https://bugs.webkit.org/show_bug.cgi?id=57706
* platform/qt/QtMobileWebStyle.cpp:
(QtMobileWebStyle::drawRadio):
2011-04-06 Ryosuke Niwa <rniwa@webkit.org> 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Eric Seidel. Reviewed by Eric Seidel.
...@@ -87,8 +87,10 @@ void QtMobileWebStyle::drawRadio(QPainter* painter, const QSize& size, bool chec ...@@ -87,8 +87,10 @@ void QtMobileWebStyle::drawRadio(QPainter* painter, const QSize& size, bool chec
{ {
painter->setRenderHint(QPainter::Antialiasing, true); painter->setRenderHint(QPainter::Antialiasing, true);
// get minor size to do not paint a wide elipse
qreal squareSize = qMin(size.width(), size.height());
// deflate one pixel // deflate one pixel
QRect rect = QRect(QPoint(1, 1), QSize(size.width() - 2, size.height() - 2)); QRect rect = QRect(QPoint(1, 1), QSize(squareSize - 2, squareSize - 2));
const QPoint centerGradient(rect.bottomRight() * 0.7); const QPoint centerGradient(rect.bottomRight() * 0.7);
QRadialGradient radialGradient(centerGradient, centerGradient.x() - 1); QRadialGradient radialGradient(centerGradient, centerGradient.x() - 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment