flickering fixed, when moving over the scroll bar handle
This commit is contained in:
parent
158960fd80
commit
0bdc7f5f86
@ -93,10 +93,12 @@ class QskScrollView::PrivateData
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
subControls[0] = HorizontalScrollHandle;;
|
subControls[0] = HorizontalScrollHandle;
|
||||||
subControls[1] = HorizontalScrollBar;
|
subControls[1] = HorizontalScrollBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool wasHovered = hasState( subControls[1], QskScrollView::Hovered );
|
||||||
|
|
||||||
hoveredSubControl = subControl;
|
hoveredSubControl = subControl;
|
||||||
|
|
||||||
auto oldStates = scrollView->skinStates();
|
auto oldStates = scrollView->skinStates();
|
||||||
@ -106,6 +108,8 @@ class QskScrollView::PrivateData
|
|||||||
qSwap( oldStates, newStates );
|
qSwap( oldStates, newStates );
|
||||||
|
|
||||||
scrollView->startHintTransitions( { subControls[0] }, oldStates, newStates );
|
scrollView->startHintTransitions( { subControls[0] }, oldStates, newStates );
|
||||||
|
|
||||||
|
if ( wasHovered != hasState( subControls[1], QskScrollView::Hovered ) )
|
||||||
scrollView->startHintTransitions( { subControls[1] }, oldStates, newStates );
|
scrollView->startHintTransitions( { subControls[1] }, oldStates, newStates );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,6 +124,7 @@ class QskScrollView::PrivateData
|
|||||||
if ( subControl == stateSubcontrol )
|
if ( subControl == stateSubcontrol )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// the scroll bar inherits pressed/hovered from the handle
|
||||||
if ( subControl == VerticalScrollBar )
|
if ( subControl == VerticalScrollBar )
|
||||||
return stateSubcontrol == VerticalScrollHandle;
|
return stateSubcontrol == VerticalScrollHandle;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user