Skip to content

Commit

Permalink
Fix slightly oversized selection range when in flipped direction modes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 26, 2020
1 parent ac5295c commit ca03f64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/qgsrangeslider.cpp
Expand Up @@ -288,9 +288,9 @@ QRect QgsRangeSlider::selectedRangeRect()
switch ( mStyleOption.orientation )
{
case Qt::Horizontal:
selectionRect = mFlipped ? QRect( upperHandleRect.left(),
selectionRect = mFlipped ? QRect( upperHandleRect.right(),
grooveRect.y(),
lowerHandleRect.right() - upperHandleRect.right(),
lowerHandleRect.left() - upperHandleRect.right(),
grooveRect.height()
)
: QRect( lowerHandleRect.right(),
Expand All @@ -302,9 +302,9 @@ QRect QgsRangeSlider::selectedRangeRect()

case Qt::Vertical:
selectionRect = mFlipped ? QRect( grooveRect.x(),
lowerHandleRect.bottom(),
lowerHandleRect.top(),
grooveRect.width(),
upperHandleRect.top() - lowerHandleRect.top()
upperHandleRect.bottom() - lowerHandleRect.top()
)
: QRect( grooveRect.x(),
upperHandleRect.top(),
Expand Down

0 comments on commit ca03f64

Please sign in to comment.