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

* Fixed Track- and Artist-page layout while loading items.

This commit is contained in:
Christian Muehlhaeuser
2013-09-07 18:19:59 +02:00
parent 5f157a4f78
commit ccea2fdbed
3 changed files with 51 additions and 31 deletions

View File

@@ -13,7 +13,7 @@
<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_7" stretch="0,0,0,0,0,1,1"> <layout class="QVBoxLayout" name="verticalLayout_7" stretch="0,0,0,0,0,0,1">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@@ -409,6 +409,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer">
<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> </layout>
</widget> </widget>
</item> </item>
@@ -418,11 +431,6 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>PlaylistView</class>
<extends>QTreeView</extends>
<header location="global">playlist/PlaylistView.h</header>
</customwidget>
<customwidget> <customwidget>
<class>GridView</class> <class>GridView</class>
<extends>QListView</extends> <extends>QListView</extends>
@@ -433,6 +441,11 @@
<extends>QLabel</extends> <extends>QLabel</extends>
<header>widgets/PlayableCover.h</header> <header>widgets/PlayableCover.h</header>
</customwidget> </customwidget>
<customwidget>
<class>PlaylistView</class>
<extends>QTreeView</extends>
<header location="global">playlist/PlaylistView.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
<connections/> <connections/>

View File

@@ -47,9 +47,9 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par
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->statsLabel->setVisible( false ); ui->statsLabel->setVisible( false );
ui->lyricsView->setVisible( false ); // FIXME eventually /* ui->lyricsView->setVisible( false ); // FIXME eventually
TomahawkStyle::stylePageFrame( ui->lyricsView ); TomahawkStyle::stylePageFrame( ui->lyricsView );
TomahawkStyle::styleScrollBar( ui->lyricsView->verticalScrollBar() ); TomahawkStyle::styleScrollBar( ui->lyricsView->verticalScrollBar() );*/
ui->lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_BACKGROUND.name() ) ); ui->lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_BACKGROUND.name() ) );
ui->lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) ); ui->lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
@@ -131,12 +131,12 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par
ui->statsLabel->setFont( f ); ui->statsLabel->setFont( f );
} }
{ /*{
QPalette p = ui->lyricsView->palette(); QPalette p = ui->lyricsView->palette();
p.setColor( QPalette::Foreground, TomahawkStyle::PAGE_FOREGROUND ); p.setColor( QPalette::Foreground, TomahawkStyle::PAGE_FOREGROUND );
p.setColor( QPalette::Text, TomahawkStyle::PAGE_FOREGROUND ); p.setColor( QPalette::Text, TomahawkStyle::PAGE_FOREGROUND );
ui->lyricsView->setPalette( p ); ui->lyricsView->setPalette( p );
} }*/
{ {
m_scrollArea = new QScrollArea(); m_scrollArea = new QScrollArea();
@@ -317,7 +317,7 @@ TrackInfoWidget::onSimilarTracksLoaded()
void void
TrackInfoWidget::onLyricsLoaded() TrackInfoWidget::onLyricsLoaded()
{ {
ui->lyricsView->setHtml( m_query->track()->lyrics().join( "<br/>" ) ); // ui->lyricsView->setHtml( m_query->track()->lyrics().join( "<br/>" ) );
} }

View File

@@ -13,7 +13,7 @@
<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_2" stretch="0,0,0,0,1"> <layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,0,0,1">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@@ -180,25 +180,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QTextBrowser" name="lyricsView">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
</size>
</property>
<property name="openLinks">
<bool>false</bool>
</property>
</widget>
</item>
<item> <item>
<widget class="QWidget" name="widget" native="true"> <widget class="QWidget" name="widget" native="true">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@@ -274,9 +255,35 @@
</property> </property>
</widget> </widget>
</item> </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> </layout>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer_2">
<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> </layout>
</widget> </widget>
</item> </item>