src/hbwidgets/sliders/hbratingslider.cpp
changeset 23 e6ad4ef83b23
parent 21 4633027730f5
child 28 b7da29130b0e
--- a/src/hbwidgets/sliders/hbratingslider.cpp	Wed Aug 18 10:05:37 2010 +0300
+++ b/src/hbwidgets/sliders/hbratingslider.cpp	Thu Sep 02 20:44:51 2010 +0300
@@ -741,6 +741,12 @@
         option->progressValue = d->mCurrentValue;
         option->disableState = !isEnabled();
         option->pressedState = d->mMousePressed;
+        if(layoutDirection() == Qt::RightToLeft) {
+            option->inverted = true;
+        }
+        else {
+            option->inverted = false;
+        }
     }
 }
 
@@ -773,14 +779,21 @@
  */
 void HbRatingSlider::changeEvent(QEvent *event)
 {
+    Q_D(HbRatingSlider);
     HbWidget::changeEvent(event);
     switch (event->type()) {
     case QEvent::LayoutDirectionChange:
-        updatePrimitives();
+        {
+            HbStyleOptionRatingSlider option;
+            initStyleOption(&option);
+            if (d->mTrack) {
+               HbStylePrivate::updatePrimitive(d->mTrack, HbStylePrivate::P_RatingSlider_track, &option);
+            }
+        }
         break;
     case QEvent::EnabledChange:
          updatePrimitives();
-          break;
+         break;
     default:
         break;
     }