mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
Move menu with the toolbutton if the button's position changes.
This commit is contained in:
@@ -149,6 +149,19 @@ AccountsToolButton::paintEvent( QPaintEvent* event )
|
|||||||
painter.end();
|
painter.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
AccountsToolButton::moveEvent( QMoveEvent* event )
|
||||||
|
{
|
||||||
|
if ( m_popup )
|
||||||
|
{
|
||||||
|
if ( isDown() )
|
||||||
|
{
|
||||||
|
QPoint myPos = mapToGlobal( rect().bottomRight() );
|
||||||
|
m_popup->anchorAt( myPos );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AccountsToolButton::popupHidden() //SLOT
|
AccountsToolButton::popupHidden() //SLOT
|
||||||
{
|
{
|
||||||
|
@@ -42,6 +42,7 @@ signals:
|
|||||||
protected:
|
protected:
|
||||||
void mousePressEvent( QMouseEvent* event );
|
void mousePressEvent( QMouseEvent* event );
|
||||||
void paintEvent( QPaintEvent* event );
|
void paintEvent( QPaintEvent* event );
|
||||||
|
void moveEvent( QMoveEvent* event );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void popupHidden();
|
void popupHidden();
|
||||||
|
Reference in New Issue
Block a user