From dce0615a28b134f131d7151059fee0ba1bc236ce Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 20 Jun 2012 17:39:33 +0200 Subject: [PATCH] * Tweaked artist page some more. --- .../widgets/infowidgets/ArtistInfoWidget.cpp | 39 ++- .../widgets/infowidgets/ArtistInfoWidget.ui | 261 +++++++++++++----- 2 files changed, 223 insertions(+), 77 deletions(-) diff --git a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.cpp b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.cpp index a6f0afc76..7a53722d7 100644 --- a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.cpp +++ b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.cpp @@ -51,7 +51,7 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget* ui->setupUi( widget ); QPalette pal = palette(); - pal.setColor( QPalette::Window, QColor( "#323435" ) ); + pal.setColor( QPalette::Window, QColor( "#454e59" ) ); widget->setPalette( pal ); widget->setAutoFillBackground( true ); @@ -97,7 +97,6 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget* m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::ScaledCover, QSize( 48, 48 ) ); ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::ScaledCover, QSize( ui->cover->sizeHint() ) ) ); - ui->biography->setStyleSheet( "QTextBrowser#biography { background-color: transparent; }" ); ui->biography->setFrameShape( QFrame::NoFrame ); ui->biography->setAttribute( Qt::WA_MacShowFocusRect, 0 ); TomahawkUtils::styleScrollBar( ui->biography->verticalScrollBar() ); @@ -110,16 +109,12 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget* ui->label->setPalette( p ); ui->label_2->setPalette( p ); ui->label_3->setPalette( p ); - - ui->label->setContentsMargins( 0, 0, 0, 0 ); - ui->label_2->setContentsMargins( 0, 16, 0, 0 ); - ui->label_3->setContentsMargins( 0, 16, 0, 0 ); QScrollArea* area = new QScrollArea(); area->setWidgetResizable( true ); area->setWidget( widget ); - area->setStyleSheet( "QScrollArea { background-color: #323435; }" ); + area->setStyleSheet( "QScrollArea { background-color: #454e59; }" ); area->setFrameShape( QFrame::NoFrame ); area->setAttribute( Qt::WA_MacShowFocusRect, 0 ); @@ -131,6 +126,26 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget* TomahawkUtils::styleScrollBar( ui->albums->horizontalScrollBar() ); TomahawkUtils::styleScrollBar( ui->relatedArtists->horizontalScrollBar() ); + ui->biography->setStyleSheet( "QTextBrowser { background-color: transparent; }" ); + + ui->albums->setStyleSheet( "QListView { background-color: transparent; }" ); + ui->albumFrame->setStyleSheet( "QFrame#albumFrame { background-color: transparent; }" + "QFrame#albumFrame { " + "border-image: url(" RESPATH "images/scrollbar-vertical-handle.png) 3 3 3 3 stretch stretch;" + "border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" ); + + ui->relatedArtists->setStyleSheet( "QListView { background-color: transparent; }" ); + ui->artistFrame->setStyleSheet( "QFrame#artistFrame { background-color: transparent; }" + "QFrame#artistFrame { " + "border-image: url(" RESPATH "images/scrollbar-vertical-handle.png) 3 3 3 3 stretch stretch;" + "border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" ); + +// ui->topHits->setStyleSheet( "QTreeView#topHits { background-color: transparent; }" ); + ui->trackFrame->setStyleSheet( "QFrame#trackFrame { background-color: transparent; }" + "QFrame#trackFrame { " + "border-image: url(" RESPATH "images/scrollbar-vertical-handle.png) 3 3 3 3 stretch stretch;" + "border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" ); + load( artist ); } @@ -207,13 +222,13 @@ ArtistInfoWidget::load( const artist_ptr& artist ) if ( !m_artist->albums( Mixed ).isEmpty() ) onAlbumsFound( m_artist->albums( Mixed ), Mixed ); - + if ( !m_artist->tracks().isEmpty() ) onTracksFound( m_artist->tracks(), Mixed ); - + if ( !m_artist->similarArtists().isEmpty() ) onSimilarArtistsLoaded(); - + if ( !m_artist->biography().isEmpty() ) onBiographyLoaded(); @@ -251,7 +266,7 @@ ArtistInfoWidget::onBiographyLoaded() { m_longDescription = m_artist->biography(); emit longDescriptionChanged( m_longDescription ); - + ui->biography->setHtml( m_artist->biography() ); } @@ -264,7 +279,7 @@ ArtistInfoWidget::onArtistImageUpdated() m_pixmap = m_artist->cover( QSize( 0, 0 ) ); emit pixmapChanged( m_pixmap ); - + ui->cover->setPixmap( m_artist->cover( ui->cover->sizeHint() ) ); } diff --git a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.ui b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.ui index 2395d2d8b..76ef9b62f 100644 --- a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.ui +++ b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.ui @@ -7,7 +7,7 @@ 0 0 965 - 824 + 912 @@ -17,7 +17,7 @@ - 16 + 12 12 @@ -31,101 +31,232 @@ - - - - 20 - 75 - true - - - - Top Hits - - - 0 - - - - - + 0 - 300 + 0 - - true + + QFrame::StyledPanel + + QFrame::Raised + + + + 4 + + + 8 + + + 4 + + + 8 + + + 8 + + + + + + 20 + 75 + true + + + + Top Hits + + + 0 + + + + + + + + 0 + 300 + + + + true + + + + - - - - Arial - 20 - 75 - true - + + + Qt::Vertical - - Albums + + QSizePolicy::Fixed - - 0 + + + 20 + 16 + - + - - - - 0 - 0 - - + 0 - 190 + 0 + + QFrame::StyledPanel + + + QFrame::Raised + + + + 4 + + + 8 + + + 4 + + + 8 + + + 4 + + + + + + Arial + 20 + 75 + true + + + + Albums + + + 0 + + + + + + + + 0 + 0 + + + + + 0 + 190 + + + + + - - - - Arial - 20 - 75 - true - + + + Qt::Vertical - - Related Artists + + QSizePolicy::Fixed - - 0 + + + 20 + 16 + - + - - - - 0 - 0 - - + 0 - 190 + 0 + + QFrame::StyledPanel + + + QFrame::Raised + + + + 4 + + + 8 + + + 4 + + + 8 + + + 4 + + + + + + Arial + 20 + 75 + true + + + + Related Artists + + + 0 + + + + + + + + 0 + 0 + + + + + 0 + 190 + + + + +