1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

* Tweaked artist page some more.

This commit is contained in:
Christian Muehlhaeuser
2012-06-20 17:39:33 +02:00
parent 27ea1ea793
commit dce0615a28
2 changed files with 223 additions and 77 deletions

View File

@@ -51,7 +51,7 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
ui->setupUi( widget ); ui->setupUi( widget );
QPalette pal = palette(); QPalette pal = palette();
pal.setColor( QPalette::Window, QColor( "#323435" ) ); pal.setColor( QPalette::Window, QColor( "#454e59" ) );
widget->setPalette( pal ); widget->setPalette( pal );
widget->setAutoFillBackground( true ); 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 ) ); 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->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->setFrameShape( QFrame::NoFrame );
ui->biography->setAttribute( Qt::WA_MacShowFocusRect, 0 ); ui->biography->setAttribute( Qt::WA_MacShowFocusRect, 0 );
TomahawkUtils::styleScrollBar( ui->biography->verticalScrollBar() ); TomahawkUtils::styleScrollBar( ui->biography->verticalScrollBar() );
@@ -110,16 +109,12 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
ui->label->setPalette( p ); ui->label->setPalette( p );
ui->label_2->setPalette( p ); ui->label_2->setPalette( p );
ui->label_3->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(); QScrollArea* area = new QScrollArea();
area->setWidgetResizable( true ); area->setWidgetResizable( true );
area->setWidget( widget ); area->setWidget( widget );
area->setStyleSheet( "QScrollArea { background-color: #323435; }" ); area->setStyleSheet( "QScrollArea { background-color: #454e59; }" );
area->setFrameShape( QFrame::NoFrame ); area->setFrameShape( QFrame::NoFrame );
area->setAttribute( Qt::WA_MacShowFocusRect, 0 ); 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->albums->horizontalScrollBar() );
TomahawkUtils::styleScrollBar( ui->relatedArtists->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 ); load( artist );
} }
@@ -207,13 +222,13 @@ ArtistInfoWidget::load( const artist_ptr& artist )
if ( !m_artist->albums( Mixed ).isEmpty() ) if ( !m_artist->albums( Mixed ).isEmpty() )
onAlbumsFound( m_artist->albums( Mixed ), Mixed ); onAlbumsFound( m_artist->albums( Mixed ), Mixed );
if ( !m_artist->tracks().isEmpty() ) if ( !m_artist->tracks().isEmpty() )
onTracksFound( m_artist->tracks(), Mixed ); onTracksFound( m_artist->tracks(), Mixed );
if ( !m_artist->similarArtists().isEmpty() ) if ( !m_artist->similarArtists().isEmpty() )
onSimilarArtistsLoaded(); onSimilarArtistsLoaded();
if ( !m_artist->biography().isEmpty() ) if ( !m_artist->biography().isEmpty() )
onBiographyLoaded(); onBiographyLoaded();
@@ -251,7 +266,7 @@ ArtistInfoWidget::onBiographyLoaded()
{ {
m_longDescription = m_artist->biography(); m_longDescription = m_artist->biography();
emit longDescriptionChanged( m_longDescription ); emit longDescriptionChanged( m_longDescription );
ui->biography->setHtml( m_artist->biography() ); ui->biography->setHtml( m_artist->biography() );
} }
@@ -264,7 +279,7 @@ ArtistInfoWidget::onArtistImageUpdated()
m_pixmap = m_artist->cover( QSize( 0, 0 ) ); m_pixmap = m_artist->cover( QSize( 0, 0 ) );
emit pixmapChanged( m_pixmap ); emit pixmapChanged( m_pixmap );
ui->cover->setPixmap( m_artist->cover( ui->cover->sizeHint() ) ); ui->cover->setPixmap( m_artist->cover( ui->cover->sizeHint() ) );
} }

View File

@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>965</width> <width>965</width>
<height>824</height> <height>912</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@@ -17,7 +17,7 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>16</number> <number>12</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>12</number> <number>12</number>
@@ -31,101 +31,232 @@
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QFrame" name="trackFrame">
<property name="font">
<font>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Top Hits</string>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="PlaylistView" name="topHits">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>300</height> <height>0</height>
</size> </size>
</property> </property>
<property name="headerHidden"> <property name="frameShape">
<bool>true</bool> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>8</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>8</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Top Hits</string>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="PlaylistView" name="topHits">
<property name="minimumSize">
<size>
<width>0</width>
<height>300</height>
</size>
</property>
<property name="headerHidden">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_3"> <spacer name="verticalSpacer">
<property name="font"> <property name="orientation">
<font> <enum>Qt::Vertical</enum>
<family>Arial</family>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="sizeType">
<string>Albums</string> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="margin"> <property name="sizeHint" stdset="0">
<number>0</number> <size>
<width>20</width>
<height>16</height>
</size>
</property> </property>
</widget> </spacer>
</item> </item>
<item> <item>
<widget class="GridView" name="albums"> <widget class="QFrame" name="albumFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>190</height> <height>0</height>
</size> </size>
</property> </property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>8</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<family>Arial</family>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Albums</string>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="GridView" name="albums">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>190</height>
</size>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_2"> <spacer name="verticalSpacer_2">
<property name="font"> <property name="orientation">
<font> <enum>Qt::Vertical</enum>
<family>Arial</family>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="sizeType">
<string>Related Artists</string> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="margin"> <property name="sizeHint" stdset="0">
<number>0</number> <size>
<width>20</width>
<height>16</height>
</size>
</property> </property>
</widget> </spacer>
</item> </item>
<item> <item>
<widget class="GridView" name="relatedArtists"> <widget class="QFrame" name="artistFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>190</height> <height>0</height>
</size> </size>
</property> </property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>8</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<family>Arial</family>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Related Artists</string>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="GridView" name="relatedArtists">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>190</height>
</size>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>