diff options
author | Martin Smith <msmith@trolltech.com> | 2010-05-04 13:33:43 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-05-04 13:33:43 (GMT) |
commit | b92f81172071e78156562d76c9d8ae6e8d3e16c5 (patch) | |
tree | e7539da8d625edce056b57e5f2f27d3e414344de /src/gui/styles/qgtkstyle.cpp | |
parent | 409ced7dc098438e185b9a6db6b3f53b1472839d (diff) | |
parent | d52cc1ded5f30a6da0d11b9c3f7de66b2d3e9ee9 (diff) | |
download | Qt-b92f81172071e78156562d76c9d8ae6e8d3e16c5.zip Qt-b92f81172071e78156562d76c9d8ae6e8d3e16c5.tar.gz Qt-b92f81172071e78156562d76c9d8ae6e8d3e16c5.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/gui/styles/qgtkstyle.cpp')
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index e3ca8b2..0988fd8 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1937,14 +1937,11 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget); QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget); - QRect ticks = proxy()->subControlRect(CC_Slider, option, SC_SliderTickmarks, widget); bool horizontal = slider->orientation == Qt::Horizontal; bool ticksAbove = slider->tickPosition & QSlider::TicksAbove; bool ticksBelow = slider->tickPosition & QSlider::TicksBelow; - QColor activeHighlight = option->palette.color(QPalette::Normal, QPalette::Highlight); - QPixmap cache; QBrush oldBrush = painter->brush(); QPen oldPen = painter->pen(); @@ -1953,6 +1950,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom QColor highlightAlpha(Qt::white); highlightAlpha.setAlpha(80); + QGtkStylePrivate::gtk_widget_set_direction(hScaleWidget, slider->upsideDown ? + GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); GtkWidget *scaleWidget = horizontal ? hScaleWidget : vScaleWidget; style = scaleWidget->style; @@ -1986,11 +1985,21 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom QRect lowerGroove = grooveRect; if (horizontal) { - upperGroove.setLeft(handle.center().x()); - lowerGroove.setRight(handle.center().x()); + if (slider->upsideDown) { + lowerGroove.setLeft(handle.center().x()); + upperGroove.setRight(handle.center().x()); + } else { + upperGroove.setLeft(handle.center().x()); + lowerGroove.setRight(handle.center().x()); + } } else { - upperGroove.setBottom(handle.center().y()); - lowerGroove.setTop(handle.center().y()); + if (!slider->upsideDown) { + lowerGroove.setBottom(handle.center().y()); + upperGroove.setTop(handle.center().y()); + } else { + upperGroove.setBottom(handle.center().y()); + lowerGroove.setTop(handle.center().y()); + } } gtkPainter.paintBox( scaleWidget, "trough-upper", upperGroove, state, |