diff --git a/src/libtomahawk/playlist/playlistmanager.cpp b/src/libtomahawk/playlist/playlistmanager.cpp index 86a38fa77..721194805 100644 --- a/src/libtomahawk/playlist/playlistmanager.cpp +++ b/src/libtomahawk/playlist/playlistmanager.cpp @@ -54,6 +54,11 @@ PlaylistManager::PlaylistManager( QObject* parent ) m_topbar = new TopBar(); m_stack = new QStackedWidget(); + QFrame* line = new QFrame(); + line->setFrameStyle( QFrame::HLine ); + line->setStyleSheet( "border: 1px solid gray;" ); + line->setMaximumHeight( 1 ); + m_splitter = new AnimatedSplitter(); m_splitter->setOrientation( Qt::Vertical ); m_splitter->setChildrenCollapsible( false ); @@ -70,6 +75,7 @@ PlaylistManager::PlaylistManager( QObject* parent ) m_widget->layout()->setMargin( 0 ); m_widget->layout()->addWidget( m_topbar ); + m_widget->layout()->addWidget( line ); m_widget->layout()->addWidget( m_splitter ); m_superCollectionView = new CollectionView(); @@ -267,6 +273,7 @@ PlaylistManager::show( const Tomahawk::collection_ptr& collection ) CollectionView* view = new CollectionView(); CollectionFlatModel* model = new CollectionFlatModel(); view->setModel( model ); + view->setFrameShape( QFrame::NoFrame ); model->addCollection( collection ); m_currentInterface = view->proxyModel(); diff --git a/src/libtomahawk/playlist/topbar/topbar.cpp b/src/libtomahawk/playlist/topbar/topbar.cpp index a144bcdc7..66147b173 100644 --- a/src/libtomahawk/playlist/topbar/topbar.cpp +++ b/src/libtomahawk/playlist/topbar/topbar.cpp @@ -25,6 +25,8 @@ TopBar::TopBar( QWidget* parent ) { ui->setupUi( this ); + setAutoFillBackground( true ); + ui->statsLabelNumTracks->setFormat( "%L1 " + tr( "Tracks" ) ); ui->statsLabelNumArtists->setFormat( "%L1 " + tr( "Artists" ) ); connect( ui->filterEdit, SIGNAL( textChanged( QString ) ), SIGNAL( filterTextChanged( QString ) ) ); @@ -94,6 +96,23 @@ TopBar::changeEvent( QEvent *e ) } +void +TopBar::resizeEvent(QResizeEvent* e ) +{ + QWidget::resizeEvent( e ); + + QLinearGradient gradient = QLinearGradient( contentsRect().topLeft(), contentsRect().bottomRight() ); + gradient.setColorAt( 0.0, QColor( 80, 80, 80 ) ); + gradient.setColorAt( 1.0, QColor( 43, 43, 43 ) ); + + QPalette p = palette(); + p.setBrush( QPalette::Background, QBrush( gradient ) ); + p.setBrush( QPalette::Window, QBrush( gradient ) ); + p.setBrush( QPalette::Base, QBrush( gradient ) ); + setPalette( p ); +} + + void TopBar::fadeInDude( unsigned int i ) { diff --git a/src/libtomahawk/playlist/topbar/topbar.h b/src/libtomahawk/playlist/topbar/topbar.h index 80208aa75..3f9e33f7c 100644 --- a/src/libtomahawk/playlist/topbar/topbar.h +++ b/src/libtomahawk/playlist/topbar/topbar.h @@ -41,6 +41,7 @@ public slots: protected: void changeEvent( QEvent* e ); + void resizeEvent( QResizeEvent* e ); private: void fadeOutDude( unsigned int i ); diff --git a/src/sourcetree/sourcetreeview.cpp b/src/sourcetree/sourcetreeview.cpp index 25d8da8f9..a76c0af2c 100644 --- a/src/sourcetree/sourcetreeview.cpp +++ b/src/sourcetree/sourcetreeview.cpp @@ -43,6 +43,9 @@ SourceTreeView::SourceTreeView( QWidget* parent ) , m_collectionModel( new CollectionModel( this ) ) , m_dragging( false ) { + setFrameShape( QFrame::NoFrame ); + setContentsMargins( 0, 0, 0, 0 ); + setHeaderHidden( true ); setRootIsDecorated( false ); setExpandsOnDoubleClick( false ); diff --git a/src/tomahawkwindow.ui b/src/tomahawkwindow.ui index 2ded9cb4b..b5ce7b2d3 100644 --- a/src/tomahawkwindow.ui +++ b/src/tomahawkwindow.ui @@ -25,13 +25,6 @@ - - - - - - - @@ -49,6 +42,13 @@ + + + + + + +