Skip to content

Commit

Permalink
the corrected mouse/touch handling works without extending the handle
Browse files Browse the repository at this point in the history
selection area
handle selection
  • Loading branch information
uwerat committed Nov 28, 2024
1 parent 66085ea commit 7a180cf
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/controls/QskSlider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@ QSK_SYSTEM_STATE( QskSlider, Pressed, QskAspect::FirstSystemState << 2 )

static QRectF qskHandleSelectionRect( const QskSlider* slider )
{
auto rect = slider->subControlRect( QskSlider::Handle );

#if 1
// minimum handle strut size TODO ...
const QSizeF strutSize( 60, 60 );
const auto w = qMax( ( strutSize.width() - rect.width() ) / 2, 0.0 );
const auto h = qMax( ( strutSize.height() - rect.height() ) / 2, 0.0 );
#endif

return rect.marginsAdded( { w, h, w, h } );
return slider->subControlRect( QskSlider::Handle );
}

static QRectF qskSliderSelectionRect( const QskSlider* slider )
Expand Down

0 comments on commit 7a180cf

Please sign in to comment.