2011-04-07 Andreas Kling <andreas.kling@nokia.com>

        Reviewed by Benjamin Poulain.

        [Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.

        When initializing a QStyleOptionSlider from a widget, the State_Horizontal
        hint may get set depending on how that widget is laid out in its parent.
        If this happens when drawing a vertical scrollbar, the hint is never
        cleared and we end up painting a vertical scrollbar with horizontal arrows.

        Covered by pixel tests which should no longer paint silly scrollbars.

        * platform/qt/ScrollbarThemeQt.cpp:
        (WebCore::styleOptionSlider):


git-svn-id: svn://svn.chromium.org/blink/trunk@83160 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 40bac59a
2011-04-07 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Benjamin Poulain.
[Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.
When initializing a QStyleOptionSlider from a widget, the State_Horizontal
hint may get set depending on how that widget is laid out in its parent.
If this happens when drawing a vertical scrollbar, the hint is never
cleared and we end up painting a vertical scrollbar with horizontal arrows.
Covered by pixel tests which should no longer paint silly scrollbars.
* platform/qt/ScrollbarThemeQt.cpp:
(WebCore::styleOptionSlider):
2011-04-07 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
......@@ -110,8 +110,12 @@ static QStyleOptionSlider* styleOptionSlider(Scrollbar* scrollbar, QWidget* widg
if (scrollbar->controlSize() != RegularScrollbar)
opt.state |= QStyle::State_Mini;
opt.orientation = (scrollbar->orientation() == VerticalScrollbar) ? Qt::Vertical : Qt::Horizontal;
if (scrollbar->orientation() == HorizontalScrollbar)
opt.state |= QStyle::State_Horizontal;
else
opt.state &= ~QStyle::State_Horizontal;
opt.sliderValue = scrollbar->value();
opt.sliderPosition = opt.sliderValue;
opt.pageStep = scrollbar->pageStep();
......
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