Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge

  • Loading branch information...
commit 7e29b3046893aadb52e827a6e29c0e2ea72ef85c 2 parents 5104b47 + 6e0705b
authored

Showing 1 changed file with 3 additions and 7 deletions. Show diff stats Hide diff stats

  1. 10  src/gui/qxtspanslider.cpp
10  src/gui/qxtspanslider.cpp
@@ -701,16 +701,12 @@ void QxtSpanSlider::paintEvent(QPaintEvent* event)
701 701
     Q_UNUSED(event);
702 702
     QStylePainter painter(this);
703 703
 
704  
-    // ticks
  704
+    // groove & ticks
705 705
     QStyleOptionSlider opt;
706 706
     qxt_d().initStyleOption(&opt);
707  
-    opt.subControls = QStyle::SC_SliderTickmarks;
708  
-    painter.drawComplexControl(QStyle::CC_Slider, opt);
709  
-
710  
-    // groove
711 707
     opt.sliderValue = 0;
712 708
     opt.sliderPosition = 0;
713  
-    opt.subControls = QStyle::SC_SliderGroove;
  709
+    opt.subControls = QStyle::SC_SliderGroove | QStyle::SC_SliderTickmarks;
714 710
     painter.drawComplexControl(QStyle::CC_Slider, opt);
715 711
 
716 712
     // handle rects
@@ -724,7 +720,7 @@ void QxtSpanSlider::paintEvent(QPaintEvent* event)
724 720
     // span
725 721
     const int minv = qMin(lrv, urv);
726 722
     const int maxv = qMax(lrv, urv);
727  
-    const QPoint c = style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderGroove, this).center();
  723
+    const QPoint c = QRect(lr.center(), ur.center()).center();
728 724
     QRect spanRect;
729 725
     if (orientation() == Qt::Horizontal)
730 726
         spanRect = QRect(QPoint(minv, c.y() - 2), QPoint(maxv, c.y() + 1));

0 notes on commit 7e29b30

Please sign in to comment.
Something went wrong with that request. Please try again.