1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 13:01:53 +02:00

* Tweaked track page some more.

This commit is contained in:
Christian Muehlhaeuser 2012-06-20 17:40:09 +02:00
parent dce0615a28
commit faf6374967
2 changed files with 96 additions and 50 deletions

View File

@ -34,8 +34,6 @@
using namespace Tomahawk;
#define BGCOLOR_LEFT QString( "#323435" )
#define BGCOLOR_RIGHT QString( "#454e59" )
TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* parent )
: QWidget( parent )
@ -45,19 +43,13 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par
ui->setupUi( widget );
QPalette pal = palette();
pal.setColor( QPalette::Window, QColor( BGCOLOR_LEFT ) );
pal.setColor( QPalette::Window, QColor( "#454e59" ) );
widget->setPalette( pal );
widget->setAutoFillBackground( true );
pal.setColor( QPalette::Window, QColor( BGCOLOR_RIGHT ) );
ui->rightBar->setPalette( pal );
ui->rightBar->setAutoFillBackground( true );
// layout()->setSpacing( 0 );
// ui->tracksWidget->setStyleSheet( "QWidget#tracksWidget { background-color: #323435; }" );
// ui->headerWidget->setStyleSheet( "QWidget#headerWidget { background-image: url(" RESPATH "images/playlist-header-tiled.png); }" );
// ui->headerWidget->setStyleSheet( "background-color: #323435;" );
// ui->tracksWidget->setStyleSheet( "background-color: #323435;" );
ui->statsLabel->setStyleSheet( "QLabel { background-image:url(); border: 2px solid #dddddd; background-color: #faf9f9; border-radius: 4px; padding: 12px; }" );
ui->lyricsView->setStyleSheet( "QTextBrowser#lyricsView { background-color: transparent; }" );
@ -111,8 +103,7 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par
area->setWidget( widget );
area->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn );
area->setStyleSheet( "QScrollArea { background-color:"
"qlineargradient( x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 " + BGCOLOR_LEFT + ", stop: 0.95 " + BGCOLOR_LEFT + ", stop: 1 " + BGCOLOR_RIGHT + "); }" );
area->setStyleSheet( "QScrollArea { background-color: #454e59 }" );
area->setFrameShape( QFrame::NoFrame );
area->setAttribute( Qt::WA_MacShowFocusRect, 0 );
@ -121,8 +112,14 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par
setLayout( layout );
TomahawkUtils::unmarginLayout( layout );
ui->similarTracksView->setStyleSheet( "QListView { background-color: transparent; }" );
ui->frame->setStyleSheet( "QFrame#frame { background-color: transparent; }"
"QFrame#frame { "
"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( query );
connect( ui->artistLabel, SIGNAL( clickedArtist() ), SLOT( onArtistClicked() ) );
connect( ui->albumLabel, SIGNAL( clickedAlbum() ), SLOT( onAlbumClicked() ) );
}

View File

@ -20,7 +20,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>16</number>
<number>12</number>
</property>
<property name="topMargin">
<number>0</number>
@ -46,45 +46,78 @@
<number>12</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<family>Arial</family>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Similar Tracks</string>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="GridView" name="similarTracksView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<widget class="QFrame" name="frame">
<property name="minimumSize">
<size>
<width>20</width>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</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>
<family>Arial</family>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Similar Tracks</string>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="GridView" name="similarTracksView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</item>
@ -142,6 +175,22 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
@ -213,7 +262,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>12</height>
<height>16</height>
</size>
</property>
</spacer>