mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
* Smaller default size for OverlayWidget.
* Disabled OverlayWidget for QueueView.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "playlist/queueproxymodel.h"
|
||||
#include "widgets/overlaywidget.h"
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
#define MINIMUM_HEIGHT 38
|
||||
@@ -25,6 +26,7 @@ QueueView::QueueView( AnimatedSplitter* parent )
|
||||
m_queue->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored );
|
||||
m_queue->setFrameShape( QFrame::NoFrame );
|
||||
m_queue->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||
m_queue->overlay()->setEnabled( false );
|
||||
|
||||
m_button = new QPushButton();
|
||||
m_button->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );
|
||||
|
@@ -15,7 +15,7 @@ OverlayWidget::OverlayWidget( QWidget* parent )
|
||||
, m_opacity( 0.00 )
|
||||
, m_parent( parent )
|
||||
{
|
||||
resize( 380, 220 );
|
||||
resize( 380, 128 );
|
||||
setAttribute( Qt::WA_TranslucentBackground, true );
|
||||
|
||||
setOpacity( m_opacity );
|
||||
@@ -58,6 +58,9 @@ OverlayWidget::setText( const QString& text )
|
||||
void
|
||||
OverlayWidget::show( int timeoutSecs )
|
||||
{
|
||||
if ( !isEnabled() )
|
||||
return;
|
||||
|
||||
QPropertyAnimation* animation = new QPropertyAnimation( this, "opacity" );
|
||||
animation->setDuration( FADING_DURATION );
|
||||
animation->setStartValue( 0.00 );
|
||||
@@ -72,20 +75,26 @@ OverlayWidget::show( int timeoutSecs )
|
||||
void
|
||||
OverlayWidget::hide()
|
||||
{
|
||||
if ( !isEnabled() )
|
||||
return;
|
||||
|
||||
QPropertyAnimation* animation = new QPropertyAnimation( this, "opacity" );
|
||||
animation->setDuration( FADING_DURATION );
|
||||
animation->setEndValue( 0.00 );
|
||||
animation->start();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
OverlayWidget::shown() const
|
||||
{
|
||||
if ( !isEnabled() )
|
||||
return false;
|
||||
|
||||
return m_opacity == OPACITY;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
OverlayWidget::paintEvent( QPaintEvent* event )
|
||||
{
|
||||
|
Reference in New Issue
Block a user