• Cheng Sun's avatar
    Fix QToolButtonExt edge cases · 77bf3d50
    Cheng Sun authored
    Previously QToolButtonExt had some undesirable edge case behaviour.
    
    Firstly, once the user presses down on a QToolButtonExt there is no
    way to cancel the action; either a short or a long click will be
    generated. Compare this to a normal button, which can be cancelled by
    releasing the mouse outside of the button area.
    
    Secondly, with the mouse button held down, moving the mouse in and out
    of the button area will generate multiple short click events, when no
    event at all is desired.
    
    This patch corrects this: by releasing the mouse outside the button area
    no event is generated; additionally no short click events are generated
    simply by moving the depressed mouse in and out of the button.
    Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
    (cherry picked from commit 5337619228f8d48560601e15caf8affbb4eca3f6)
    Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
    77bf3d50
customwidgets.cpp 13.5 KB