mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
* Made deprecated InfoBar look the same as the other headers.
This commit is contained in:
parent
9a0089b2a1
commit
0b943598f3
@ -35,7 +35,7 @@
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#define ANIMATION_TIME 400
|
||||
#define IMAGE_HEIGHT 64
|
||||
#define IMAGE_HEIGHT 48
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@ -46,12 +46,9 @@ InfoBar::InfoBar( QWidget* parent )
|
||||
, m_queryLabel( 0 )
|
||||
{
|
||||
ui->setupUi( this );
|
||||
TomahawkUtils::unmarginLayout( layout() );
|
||||
layout()->setContentsMargins( 8, 4, 8, 4 );
|
||||
|
||||
QFont boldFont = ui->captionLabel->font();
|
||||
boldFont.setPointSize( TomahawkUtils::defaultFontSize() + 4 );
|
||||
boldFont.setBold( true );
|
||||
ui->captionLabel->setFont( boldFont );
|
||||
ui->captionLabel->setElideMode( Qt::ElideRight );
|
||||
|
||||
@ -66,14 +63,15 @@ InfoBar::InfoBar( QWidget* parent )
|
||||
ui->longDescriptionLabel->setFont( regFont );
|
||||
|
||||
m_whitePal = ui->captionLabel->palette();
|
||||
m_whitePal.setColor( QPalette::Foreground, Qt::white );
|
||||
m_whitePal.setColor( QPalette::Foreground, TomahawkStyle::HEADER_TEXT );
|
||||
m_whitePal.setBrush( backgroundRole(), TomahawkStyle::HEADER_BACKGROUND );
|
||||
|
||||
ui->captionLabel->setPalette( m_whitePal );
|
||||
ui->descriptionLabel->setPalette( m_whitePal );
|
||||
ui->longDescriptionLabel->setPalette( m_whitePal );
|
||||
|
||||
ui->captionLabel->setMargin( 2 );
|
||||
ui->descriptionLabel->setMargin( 1 );
|
||||
ui->descriptionLabel->setMargin( 2 );
|
||||
ui->longDescriptionLabel->setMargin( 4 );
|
||||
|
||||
ui->captionLabel->setText( QString() );
|
||||
@ -81,6 +79,11 @@ InfoBar::InfoBar( QWidget* parent )
|
||||
ui->longDescriptionLabel->setText( QString() );
|
||||
ui->imageLabel->setText( QString() );
|
||||
|
||||
ui->lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_BACKGROUND.name() ) );
|
||||
ui->lineAbove->setFrameShape( QFrame::HLine );
|
||||
ui->lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
|
||||
ui->lineBelow->setFrameShape( QFrame::HLine );
|
||||
|
||||
m_queryLabel = new QueryLabel( this );
|
||||
m_queryLabel->setType( QueryLabel::Artist );
|
||||
m_queryLabel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
|
||||
@ -98,9 +101,10 @@ InfoBar::InfoBar( QWidget* parent )
|
||||
QPalette pal = m_whitePal;
|
||||
pal.setBrush( backgroundRole(), TomahawkStyle::HEADER_BACKGROUND );
|
||||
|
||||
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||
setFixedHeight( 58 );
|
||||
setAutoFillBackground( true );
|
||||
setPalette( pal );
|
||||
setFixedHeight( 80 );
|
||||
|
||||
connect( ViewManager::instance(), SIGNAL( filterAvailable( bool ) ), SLOT( setFilterAvailable( bool ) ) );
|
||||
}
|
||||
|
@ -26,43 +26,70 @@
|
||||
<string notr="true" extracomment="not translatable because not shown to the user">InfoBar</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>8</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="imageLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>64</width>
|
||||
<height>64</height>
|
||||
<width>48</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="ElidedLabel" name="captionLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ElidedLabel" name="descriptionLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -73,17 +100,20 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ElidedLabel" name="descriptionLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
@ -150,6 +180,32 @@
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
Loading…
x
Reference in New Issue
Block a user