mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
* Dashboard should use the vanilla InfoBar.
This commit is contained in:
parent
0b943598f3
commit
9cb31e4ec6
@ -52,15 +52,10 @@ using namespace Tomahawk;
|
||||
Dashboard::Dashboard( QWidget* parent )
|
||||
: QWidget( parent )
|
||||
, ui( new Ui::Dashboard )
|
||||
, m_header( new BasicHeader( this ) )
|
||||
{
|
||||
QWidget* widget = new QWidget;
|
||||
ui->setupUi( widget );
|
||||
|
||||
m_header->setPixmap( ImageRegistry::instance()->pixmap( RESPATH "images/dashboard.svg", QSize( 0, 0 ) ) );
|
||||
m_header->setCaption( tr( "Dashboard" ) );
|
||||
m_header->setDescription( tr( "An overview of your recent activity" ) );
|
||||
|
||||
ui->lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
|
||||
ui->lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_BACKGROUND.name() ) );
|
||||
|
||||
@ -163,7 +158,6 @@ Dashboard::Dashboard( QWidget* parent )
|
||||
area->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout();
|
||||
layout->addWidget( m_header );
|
||||
layout->addWidget( area );
|
||||
setLayout( layout );
|
||||
TomahawkUtils::unmarginLayout( layout );
|
||||
@ -292,6 +286,13 @@ Dashboard::changeEvent( QEvent* e )
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
Dashboard::pixmap() const
|
||||
{
|
||||
return ImageRegistry::instance()->pixmap( RESPATH "images/dashboard.svg", QSize( 0, 0 ) );
|
||||
}
|
||||
|
||||
|
||||
QSize
|
||||
PlaylistDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||
{
|
||||
@ -456,4 +457,4 @@ PlaylistWidget::verifySize()
|
||||
|
||||
if ( model()->rowCount() > 0 )
|
||||
setFixedHeight( model()->rowCount() * itemDelegate()->sizeHint( QStyleOptionViewItem(), model()->index( 0, 0 ) ).height() + frameWidth() * 2 );
|
||||
}
|
||||
}
|
||||
|
@ -92,10 +92,11 @@ public:
|
||||
virtual QWidget* widget() { return this; }
|
||||
virtual Tomahawk::playlistinterface_ptr playlistInterface() const;
|
||||
|
||||
virtual QString title() const { return tr( "Welcome to Tomahawk" ); }
|
||||
virtual QString description() const { return QString(); }
|
||||
virtual QString title() const { return tr( "Dashboard" ); }
|
||||
virtual QString description() const { return tr( "An overview of your recent activity" ); }
|
||||
virtual QPixmap pixmap() const;
|
||||
|
||||
virtual bool showInfoBar() const { return false; }
|
||||
virtual bool showInfoBar() const { return true; }
|
||||
virtual bool isBeingPlayed() const;
|
||||
|
||||
virtual bool jumpToCurrentTrack();
|
||||
@ -120,7 +121,6 @@ private slots:
|
||||
private:
|
||||
Ui::Dashboard *ui;
|
||||
|
||||
BasicHeader* m_header;
|
||||
RecentlyPlayedModel* m_tracksModel;
|
||||
AlbumModel* m_recentAlbumsModel;
|
||||
Tomahawk::playlistinterface_ptr m_playlistInterface;
|
||||
|
Loading…
x
Reference in New Issue
Block a user