mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Fixed Track page.
This commit is contained in:
@@ -50,32 +50,71 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par
|
|||||||
connect( ui->artistLabel, SIGNAL( clickedArtist() ), SLOT( onArtistClicked() ) );
|
connect( ui->artistLabel, SIGNAL( clickedArtist() ), SLOT( onArtistClicked() ) );
|
||||||
|
|
||||||
ui->statsLabel->setStyleSheet( "QLabel { background-image:url(); border: 2px solid #dddddd; background-color: #faf9f9; border-radius: 4px; padding: 12px; }" );
|
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; }" );
|
ui->statsLabel->setVisible( false );
|
||||||
|
|
||||||
|
ui->lyricsView->setStyleSheet( "QTextBrowser#lyricsView { background-color: transparent; }" );
|
||||||
ui->lyricsView->setFrameShape( QFrame::NoFrame );
|
ui->lyricsView->setFrameShape( QFrame::NoFrame );
|
||||||
ui->lyricsView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
ui->lyricsView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||||
ui->lyricsView->setVisible( false ); // FIXME eventually
|
ui->lyricsView->setVisible( false ); // FIXME eventually
|
||||||
|
|
||||||
ui->similarTracksView->setAutoResize( true );
|
ui->similarTracksView->setAutoResize( true );
|
||||||
ui->similarTracksView->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
ui->similarTracksView->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
||||||
|
|
||||||
|
ui->lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_BACKGROUND.name() ) );
|
||||||
|
ui->lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
|
||||||
|
|
||||||
// TomahawkUtils::styleScrollBar( ui->similarTracksView->verticalScrollBar() );
|
// TomahawkUtils::styleScrollBar( ui->similarTracksView->verticalScrollBar() );
|
||||||
TomahawkStyle::styleScrollBar( ui->lyricsView->verticalScrollBar() );
|
TomahawkStyle::styleScrollBar( ui->lyricsView->verticalScrollBar() );
|
||||||
|
|
||||||
// ui->similarTracksView->setStyleSheet( "QListView { background-color: transparent; } QListView::item { background-color: transparent; }" );
|
// ui->similarTracksView->setStyleSheet( "QListView { background-color: transparent; } QListView::item { background-color: transparent; }" );
|
||||||
|
|
||||||
QFont f = ui->statsLabel->font();
|
{
|
||||||
f.setPointSize( TomahawkUtils::defaultFontSize() + 2 );
|
QFont f = ui->trackLabel->font();
|
||||||
f.setBold( true );
|
f.setFamily( "Titillium Web" );
|
||||||
ui->statsLabel->setFont( f );
|
|
||||||
|
|
||||||
QPalette p = ui->lyricsView->palette();
|
QPalette p = ui->trackLabel->palette();
|
||||||
p.setColor( QPalette::Foreground, TomahawkStyle::PAGE_FOREGROUND );
|
p.setColor( QPalette::Foreground, TomahawkStyle::HEADER_TEXT );
|
||||||
p.setColor( QPalette::Text, TomahawkStyle::PAGE_FOREGROUND );
|
|
||||||
|
|
||||||
ui->lyricsView->setPalette( p );
|
ui->trackLabel->setFont( f );
|
||||||
ui->label->setPalette( p );
|
ui->trackLabel->setPalette( p );
|
||||||
ui->artistLabel->setPalette( p );
|
}
|
||||||
ui->trackLabel->setPalette( p );
|
|
||||||
|
{
|
||||||
|
QFont f = ui->artistLabel->font();
|
||||||
|
f.setFamily( "Titillium Web" );
|
||||||
|
|
||||||
|
QPalette p = ui->artistLabel->palette();
|
||||||
|
p.setColor( QPalette::Foreground, TomahawkStyle::HEADER_TEXT );
|
||||||
|
|
||||||
|
ui->artistLabel->setFont( f );
|
||||||
|
ui->artistLabel->setPalette( p );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
QFont f = ui->label->font();
|
||||||
|
f.setBold( false );
|
||||||
|
f.setFamily( "Fauna One" );
|
||||||
|
|
||||||
|
QPalette p = ui->label->palette();
|
||||||
|
p.setColor( QPalette::Foreground, TomahawkStyle::PAGE_CAPTION );
|
||||||
|
|
||||||
|
ui->label->setFont( f );
|
||||||
|
ui->label->setPalette( p );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
QFont f = ui->statsLabel->font();
|
||||||
|
f.setPointSize( TomahawkUtils::defaultFontSize() + 2 );
|
||||||
|
f.setBold( true );
|
||||||
|
ui->statsLabel->setFont( f );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
QPalette p = ui->lyricsView->palette();
|
||||||
|
p.setColor( QPalette::Foreground, TomahawkStyle::PAGE_FOREGROUND );
|
||||||
|
p.setColor( QPalette::Text, TomahawkStyle::PAGE_FOREGROUND );
|
||||||
|
ui->lyricsView->setPalette( p );
|
||||||
|
}
|
||||||
|
|
||||||
m_relatedTracksModel = new PlayableModel( ui->similarTracksView );
|
m_relatedTracksModel = new PlayableModel( ui->similarTracksView );
|
||||||
ui->similarTracksView->setPlayableModel( m_relatedTracksModel );
|
ui->similarTracksView->setPlayableModel( m_relatedTracksModel );
|
||||||
@@ -92,12 +131,16 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par
|
|||||||
m_scrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn );
|
m_scrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn );
|
||||||
|
|
||||||
QPalette pal = palette();
|
QPalette pal = palette();
|
||||||
pal.setBrush( backgroundRole(), TomahawkStyle::PAGE_BACKGROUND );
|
pal.setBrush( backgroundRole(), TomahawkStyle::HEADER_BACKGROUND );
|
||||||
m_scrollArea->setPalette( pal );
|
m_scrollArea->setPalette( pal );
|
||||||
m_scrollArea->setAutoFillBackground( true );
|
m_scrollArea->setAutoFillBackground( true );
|
||||||
m_scrollArea->setFrameShape( QFrame::NoFrame );
|
m_scrollArea->setFrameShape( QFrame::NoFrame );
|
||||||
m_scrollArea->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
m_scrollArea->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||||
|
|
||||||
|
pal.setBrush( backgroundRole(), TomahawkStyle::PAGE_BACKGROUND );
|
||||||
|
ui->widget->setPalette( pal );
|
||||||
|
ui->widget->setAutoFillBackground( true );
|
||||||
|
|
||||||
QHBoxLayout* l = new QHBoxLayout( ui->statsWidget );
|
QHBoxLayout* l = new QHBoxLayout( ui->statsWidget );
|
||||||
m_playStatsGauge = new StatsGauge( ui->statsWidget );
|
m_playStatsGauge = new StatsGauge( ui->statsWidget );
|
||||||
m_playStatsGauge->setText( tr( "# PLAYS / ARTIST" ) );
|
m_playStatsGauge->setText( tr( "# PLAYS / ARTIST" ) );
|
||||||
@@ -111,7 +154,6 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par
|
|||||||
l->addWidget( m_playStatsTotalGauge );
|
l->addWidget( m_playStatsTotalGauge );
|
||||||
l->addSpacerItem( new QSpacerItem( 0, 1, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ) );
|
l->addSpacerItem( new QSpacerItem( 0, 1, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ) );
|
||||||
ui->statsWidget->setLayout( l );
|
ui->statsWidget->setLayout( l );
|
||||||
ui->statsLabel->setVisible( false );
|
|
||||||
TomahawkUtils::unmarginLayout( l );
|
TomahawkUtils::unmarginLayout( l );
|
||||||
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout();
|
QVBoxLayout* layout = new QVBoxLayout();
|
||||||
|
@@ -7,18 +7,18 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>965</width>
|
<width>965</width>
|
||||||
<height>771</height>
|
<height>832</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string notr="true" extracomment="not translatable because not shown to the user">Form</string>
|
<string notr="true" extracomment="not translatable because not shown to the user">Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1">
|
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,0,0,0,1">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>16</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>12</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0">
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0">
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<number>16</number>
|
<number>16</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>0</number>
|
<number>12</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="PlayableCover" name="cover">
|
<widget class="PlayableCover" name="cover">
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>8</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>18</pointsize>
|
<pointsize>20</pointsize>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>14</pointsize>
|
<pointsize>16</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -163,6 +163,32 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="Line" name="lineAbove">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>1</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="Line" name="lineBelow">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>1</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextBrowser" name="lyricsView">
|
<widget class="QTextBrowser" name="lyricsView">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -183,61 +209,81 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<property name="minimumSize">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<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">
|
<property name="spacing">
|
||||||
<number>4</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>8</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>4</number>
|
<number>16</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>8</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>8</number>
|
<number>16</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="font">
|
<property name="minimumSize">
|
||||||
<font>
|
<size>
|
||||||
<family>Arial</family>
|
<width>0</width>
|
||||||
<pointsize>18</pointsize>
|
<height>0</height>
|
||||||
<weight>75</weight>
|
</size>
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="frameShape">
|
||||||
<string>Similar Tracks</string>
|
<enum>QFrame::StyledPanel</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="frameShadow">
|
||||||
<number>0</number>
|
<enum>QFrame::Raised</enum>
|
||||||
</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>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>28</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">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<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>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Reference in New Issue
Block a user