mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 07:07:05 +02:00
* Draw divider below BasicHeader.
This commit is contained in:
@@ -69,14 +69,6 @@ FlexibleTreeView::FlexibleTreeView( QWidget* parent, QWidget* extraHeader )
|
|||||||
setLayout( new QVBoxLayout() );
|
setLayout( new QVBoxLayout() );
|
||||||
TomahawkUtils::unmarginLayout( layout() );
|
TomahawkUtils::unmarginLayout( layout() );
|
||||||
|
|
||||||
QFrame* lineAbove = new QFrame( this );
|
|
||||||
lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_UPPER.name() ) );
|
|
||||||
lineAbove->setFrameShape( QFrame::HLine );
|
|
||||||
lineAbove->setMaximumHeight( 1 );
|
|
||||||
QFrame* lineAbove2 = new QFrame( this );
|
|
||||||
lineAbove2->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
|
|
||||||
lineAbove2->setFrameShape( QFrame::HLine );
|
|
||||||
lineAbove2->setMaximumHeight( 1 );
|
|
||||||
QFrame* lineBelow = new QFrame( this );
|
QFrame* lineBelow = new QFrame( this );
|
||||||
lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_UPPER.name() ) );
|
lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_UPPER.name() ) );
|
||||||
lineBelow->setFrameShape( QFrame::HLine );
|
lineBelow->setFrameShape( QFrame::HLine );
|
||||||
@@ -87,8 +79,6 @@ FlexibleTreeView::FlexibleTreeView( QWidget* parent, QWidget* extraHeader )
|
|||||||
lineBelow2->setMaximumHeight( 1 );
|
lineBelow2->setMaximumHeight( 1 );
|
||||||
|
|
||||||
layout()->addWidget( m_header );
|
layout()->addWidget( m_header );
|
||||||
layout()->addWidget( lineAbove );
|
|
||||||
layout()->addWidget( lineAbove2 );
|
|
||||||
layout()->addWidget( m_modeHeader );
|
layout()->addWidget( m_modeHeader );
|
||||||
if ( extraHeader )
|
if ( extraHeader )
|
||||||
layout()->addWidget( extraHeader );
|
layout()->addWidget( extraHeader );
|
||||||
|
@@ -66,14 +66,6 @@ FlexibleView::FlexibleView( QWidget* parent, QWidget* extraHeader )
|
|||||||
setLayout( new QVBoxLayout() );
|
setLayout( new QVBoxLayout() );
|
||||||
TomahawkUtils::unmarginLayout( layout() );
|
TomahawkUtils::unmarginLayout( layout() );
|
||||||
|
|
||||||
QFrame* lineAbove = new QFrame( this );
|
|
||||||
lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_UPPER.name() ) );
|
|
||||||
lineAbove->setFrameShape( QFrame::HLine );
|
|
||||||
lineAbove->setMaximumHeight( 1 );
|
|
||||||
QFrame* lineAbove2 = new QFrame( this );
|
|
||||||
lineAbove2->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
|
|
||||||
lineAbove2->setFrameShape( QFrame::HLine );
|
|
||||||
lineAbove2->setMaximumHeight( 1 );
|
|
||||||
QFrame* lineBelow = new QFrame( this );
|
QFrame* lineBelow = new QFrame( this );
|
||||||
lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_UPPER.name() ) );
|
lineBelow->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_UPPER.name() ) );
|
||||||
lineBelow->setFrameShape( QFrame::HLine );
|
lineBelow->setFrameShape( QFrame::HLine );
|
||||||
@@ -84,8 +76,6 @@ FlexibleView::FlexibleView( QWidget* parent, QWidget* extraHeader )
|
|||||||
lineBelow2->setMaximumHeight( 1 );
|
lineBelow2->setMaximumHeight( 1 );
|
||||||
|
|
||||||
layout()->addWidget( m_header );
|
layout()->addWidget( m_header );
|
||||||
layout()->addWidget( lineAbove );
|
|
||||||
layout()->addWidget( lineAbove2 );
|
|
||||||
layout()->addWidget( m_modeHeader );
|
layout()->addWidget( m_modeHeader );
|
||||||
if ( extraHeader )
|
if ( extraHeader )
|
||||||
layout()->addWidget( extraHeader );
|
layout()->addWidget( extraHeader );
|
||||||
|
@@ -36,8 +36,11 @@ using namespace Tomahawk;
|
|||||||
BasicHeader::BasicHeader( QWidget* parent )
|
BasicHeader::BasicHeader( QWidget* parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
{
|
{
|
||||||
|
QLayout* l = new QVBoxLayout;
|
||||||
|
TomahawkUtils::unmarginLayout( l );
|
||||||
|
setLayout( l );
|
||||||
|
|
||||||
m_mainLayout = new QHBoxLayout;
|
m_mainLayout = new QHBoxLayout;
|
||||||
setLayout( m_mainLayout );
|
|
||||||
|
|
||||||
m_imageLabel = new QLabel( this );
|
m_imageLabel = new QLabel( this );
|
||||||
m_imageLabel->setFixedSize( 48, 48 );
|
m_imageLabel->setFixedSize( 48, 48 );
|
||||||
@@ -58,7 +61,7 @@ BasicHeader::BasicHeader( QWidget* parent )
|
|||||||
|
|
||||||
QPalette pal = palette();
|
QPalette pal = palette();
|
||||||
pal.setColor( QPalette::Foreground, Qt::white );
|
pal.setColor( QPalette::Foreground, Qt::white );
|
||||||
pal.setBrush( backgroundRole(), TomahawkStyle::PAGE_BACKGROUND );
|
pal.setBrush( backgroundRole(), TomahawkStyle::HEADER_LOWER );
|
||||||
|
|
||||||
m_captionLabel->setPalette( pal );
|
m_captionLabel->setPalette( pal );
|
||||||
m_descriptionLabel->setPalette( pal );
|
m_descriptionLabel->setPalette( pal );
|
||||||
@@ -86,10 +89,23 @@ BasicHeader::BasicHeader( QWidget* parent )
|
|||||||
m_captionLabel->setGraphicsEffect( effect );*/
|
m_captionLabel->setGraphicsEffect( effect );*/
|
||||||
// m_descriptionLabel->setGraphicsEffect( effect );
|
// m_descriptionLabel->setGraphicsEffect( effect );
|
||||||
|
|
||||||
TomahawkUtils::unmarginLayout( layout() );
|
QFrame* lineAbove = new QFrame( this );
|
||||||
layout()->setContentsMargins( 8, 4, 8, 4 );
|
lineAbove->setStyleSheet( QString( "QFrame { border: 1px solid %1; }" ).arg( TomahawkStyle::HEADER_UPPER.name() ) );
|
||||||
|
lineAbove->setFrameShape( QFrame::HLine );
|
||||||
|
lineAbove->setMaximumHeight( 1 );
|
||||||
|
QFrame* lineAbove2 = new QFrame( this );
|
||||||
|
lineAbove2->setStyleSheet( QString( "QFrame { border: 1px solid black; }" ) );
|
||||||
|
lineAbove2->setFrameShape( QFrame::HLine );
|
||||||
|
lineAbove2->setMaximumHeight( 1 );
|
||||||
|
|
||||||
|
l->addItem( m_mainLayout );
|
||||||
|
l->addWidget( lineAbove );
|
||||||
|
l->addWidget( lineAbove2 );
|
||||||
|
|
||||||
|
TomahawkUtils::unmarginLayout( m_mainLayout );
|
||||||
|
m_mainLayout->setContentsMargins( 8, 4, 8, 4 );
|
||||||
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||||
setFixedHeight( 56 );
|
setFixedHeight( 58 );
|
||||||
|
|
||||||
setAutoFillBackground( true );
|
setAutoFillBackground( true );
|
||||||
setPalette( pal );
|
setPalette( pal );
|
||||||
|
Reference in New Issue
Block a user