mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
* Don't paint OverlayWidget if's not enabled.
* Disable OverlayWidgets in a few cases (WelcomeWidget, SourceInfoWidget, HistoryWidgets, ...).
This commit is contained in:
parent
8c17be4175
commit
1b569c8f52
@ -11,6 +11,8 @@
|
||||
#include "database/databasecommand_alltracks.h"
|
||||
#include "database/databasecommand_allalbums.h"
|
||||
|
||||
#include "widgets/overlaywidget.h"
|
||||
|
||||
|
||||
SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget* parent )
|
||||
: QWidget( parent )
|
||||
@ -19,6 +21,7 @@ SourceInfoWidget::SourceInfoWidget( const Tomahawk::source_ptr& source, QWidget*
|
||||
ui->setupUi( this );
|
||||
|
||||
ui->sourceLabel->setText( source->friendlyName() );
|
||||
ui->historyView->overlay()->setEnabled( false );
|
||||
|
||||
m_recentCollectionModel = new CollectionFlatModel( ui->recentCollectionView );
|
||||
ui->recentCollectionView->setModel( m_recentCollectionModel );
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include "playlist/playlistmanager.h"
|
||||
#include "playlist/playlistmodel.h"
|
||||
|
||||
#include "widgets/overlaywidget.h"
|
||||
|
||||
#include "pipeline.h"
|
||||
#include "utils/xspfloader.h"
|
||||
|
||||
@ -36,6 +38,7 @@ NewPlaylistWidget::NewPlaylistWidget( QWidget* parent )
|
||||
|
||||
m_suggestionsModel = new PlaylistModel( ui->suggestionsView );
|
||||
ui->suggestionsView->setModel( m_suggestionsModel );
|
||||
ui->suggestionsView->overlay()->setEnabled( false );
|
||||
|
||||
connect( &m_filterTimer, SIGNAL( timeout() ), SLOT( updateSuggestions() ) );
|
||||
}
|
||||
|
@ -46,6 +46,9 @@ OverlayWidget::pixmap()
|
||||
void
|
||||
OverlayWidget::paint( QPainter* painter )
|
||||
{
|
||||
if ( !isEnabled() )
|
||||
return;
|
||||
|
||||
pixmap(); // cache the image
|
||||
|
||||
QRect center( QPoint( ( painter->viewport().width() - m_pixmap.width() ) / 2,
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include "playlist/playlistmanager.h"
|
||||
#include "playlist/playlistmodel.h"
|
||||
|
||||
#include "widgets/overlaywidget.h"
|
||||
|
||||
#include "sourcelist.h"
|
||||
#include "tomahawksettings.h"
|
||||
|
||||
@ -19,7 +21,9 @@ WelcomeWidget::WelcomeWidget( QWidget* parent )
|
||||
, ui( new Ui::WelcomeWidget )
|
||||
{
|
||||
ui->setupUi( this );
|
||||
|
||||
ui->playlistWidget->setItemDelegate( new PlaylistDelegate() );
|
||||
ui->tracksView->overlay()->setEnabled( false );
|
||||
|
||||
m_tracksModel = new PlaylistModel( ui->tracksView );
|
||||
ui->tracksView->setModel( m_tracksModel );
|
||||
|
Loading…
x
Reference in New Issue
Block a user