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