1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

* Added anchors to HeaderWidget.

This commit is contained in:
Christian Muehlhaeuser
2014-08-20 08:24:07 +02:00
parent 9c01ae995f
commit b5a029245d
4 changed files with 125 additions and 6 deletions

View File

@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>703</width>
<height>300</height> <height>291</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@@ -46,11 +46,113 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="artistLabel"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="text"> <property name="margin">
<string>TextLabel</string> <number>0</number>
</property> </property>
</widget> <item>
<widget class="QLabel" name="artistLabel">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="ClickableLabel" name="anchor1Label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>32</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="ClickableLabel" name="anchor2Label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>32</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="ClickableLabel" name="anchor3Label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="balanceSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>32</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
@@ -64,6 +166,11 @@
<header>widgets/BackgroundWidget.h</header> <header>widgets/BackgroundWidget.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ClickableLabel</class>
<extends>QLabel</extends>
<header>widgets/ClickableLabel.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
<connections/> <connections/>

View File

@@ -133,6 +133,10 @@ SearchWidget::SearchWidget( const QString& search, QWidget* parent )
uiHeader->artistLabel->setFont( f ); uiHeader->artistLabel->setFont( f );
uiHeader->artistLabel->setPalette( p ); uiHeader->artistLabel->setPalette( p );
uiHeader->anchor1Label->hide();
uiHeader->anchor2Label->hide();
uiHeader->anchor3Label->hide();
} }
m_stackedWidget = new QStackedWidget(); m_stackedWidget = new QStackedWidget();

View File

@@ -76,6 +76,10 @@ AlbumInfoWidget::AlbumInfoWidget( const Tomahawk::album_ptr& album, QWidget* par
uiHeader->artistLabel->setFont( f ); uiHeader->artistLabel->setFont( f );
uiHeader->artistLabel->setPalette( p ); uiHeader->artistLabel->setPalette( p );
uiHeader->anchor1Label->hide();
uiHeader->anchor2Label->hide();
uiHeader->anchor3Label->hide();
} }
ui->topHits->setStyleSheet( QString( "QListView { background-color: #f9f9f9; }" ) ); ui->topHits->setStyleSheet( QString( "QListView { background-color: #f9f9f9; }" ) );

View File

@@ -97,6 +97,10 @@ DashboardWidget::DashboardWidget( QWidget* parent )
uiHeader->artistLabel->setFont( f ); uiHeader->artistLabel->setFont( f );
uiHeader->artistLabel->setPalette( p ); uiHeader->artistLabel->setPalette( p );
uiHeader->artistLabel->setText( tr( "Dashboard" ).toUpper() ); uiHeader->artistLabel->setText( tr( "Dashboard" ).toUpper() );
uiHeader->anchor1Label->hide();
uiHeader->anchor2Label->hide();
uiHeader->anchor3Label->hide();
} }
{ {