mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 11:30:49 +02:00
Allow clicking on any part of the button
This commit is contained in:
@@ -118,7 +118,7 @@ SlideSwitchButton::mousePressEvent( QMouseEvent* e )
|
|||||||
void
|
void
|
||||||
SlideSwitchButton::mouseReleaseEvent( QMouseEvent* e )
|
SlideSwitchButton::mouseReleaseEvent( QMouseEvent* e )
|
||||||
{
|
{
|
||||||
const int delta = e->pos().x() - m_mouseDownPos.x();
|
const int delta = m_mouseDownPos.isNull() ? 0 : e->pos().x() - m_mouseDownPos.x();
|
||||||
m_mouseDownPos = QPoint();
|
m_mouseDownPos = QPoint();
|
||||||
|
|
||||||
// Only act as a real button if the user didn't drag
|
// Only act as a real button if the user didn't drag
|
||||||
|
Reference in New Issue
Block a user