mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
* Make QueueView's header draggable for resizing.
This commit is contained in:
@@ -50,6 +50,7 @@ QueueView::QueueView( AnimatedSplitter* parent )
|
|||||||
connect( ui->toggleButton, SIGNAL( clicked() ), SLOT( show() ) );
|
connect( ui->toggleButton, SIGNAL( clicked() ), SLOT( show() ) );
|
||||||
|
|
||||||
ui->toggleButton->installEventFilter( this );
|
ui->toggleButton->installEventFilter( this );
|
||||||
|
ui->toggleButton->setCursor( Qt::PointingHandCursor );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -116,8 +117,11 @@ QueueView::hide()
|
|||||||
{
|
{
|
||||||
disconnect( ui->toggleButton, SIGNAL( clicked() ), this, SLOT( hide() ) );
|
disconnect( ui->toggleButton, SIGNAL( clicked() ), this, SLOT( hide() ) );
|
||||||
connect( ui->toggleButton, SIGNAL( clicked() ), SLOT( show() ) );
|
connect( ui->toggleButton, SIGNAL( clicked() ), SLOT( show() ) );
|
||||||
|
disconnect( ui->toggleButton, SIGNAL( resized( QPoint ) ), this, SIGNAL( resizeBy( QPoint ) ) );
|
||||||
|
|
||||||
ui->toggleButton->setText( tr( "Show Queue" ) );
|
ui->toggleButton->setText( tr( "Show Queue" ) );
|
||||||
emit hideWidget();
|
|
||||||
|
AnimatedWidget::hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -126,8 +130,10 @@ QueueView::show()
|
|||||||
{
|
{
|
||||||
disconnect( ui->toggleButton, SIGNAL( clicked() ), this, SLOT( show() ) );
|
disconnect( ui->toggleButton, SIGNAL( clicked() ), this, SLOT( show() ) );
|
||||||
connect( ui->toggleButton, SIGNAL( clicked() ), SLOT( hide() ) );
|
connect( ui->toggleButton, SIGNAL( clicked() ), SLOT( hide() ) );
|
||||||
|
connect( ui->toggleButton, SIGNAL( resized( QPoint ) ), SIGNAL( resizeBy( QPoint ) ) );
|
||||||
|
|
||||||
ui->toggleButton->setText( tr( "Hide Queue" ) );
|
ui->toggleButton->setText( tr( "Hide Queue" ) );
|
||||||
emit showWidget();
|
AnimatedWidget::show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user