mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Remove tiled background image from header. I'm kinda fed up with it.
This commit is contained in:
@@ -95,10 +95,12 @@ InfoBar::InfoBar( QWidget* parent )
|
|||||||
|
|
||||||
ui->horizontalLayout->addWidget( m_searchWidget );
|
ui->horizontalLayout->addWidget( m_searchWidget );
|
||||||
|
|
||||||
setAutoFillBackground( true );
|
QPalette pal = palette();
|
||||||
|
pal.setColor( QPalette::Window, QColor( "#454e59" ) );
|
||||||
|
|
||||||
|
setPalette( pal );
|
||||||
|
setAutoFillBackground( true );
|
||||||
setFixedHeight( 80 );
|
setFixedHeight( 80 );
|
||||||
m_bgTile = TomahawkUtils::createTiledPixmap( 2000, height(), QImage( RESPATH "images/playlist-header-tiled.png" ) );
|
|
||||||
|
|
||||||
connect( ViewManager::instance(), SIGNAL( filterAvailable( bool ) ), SLOT( setFilterAvailable( bool ) ) );
|
connect( ViewManager::instance(), SIGNAL( filterAvailable( bool ) ), SLOT( setFilterAvailable( bool ) ) );
|
||||||
}
|
}
|
||||||
@@ -282,23 +284,6 @@ InfoBar::onFilterEdited()
|
|||||||
emit filterTextChanged( m_searchWidget->text() );
|
emit filterTextChanged( m_searchWidget->text() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
InfoBar::paintEvent( QPaintEvent* e )
|
|
||||||
{
|
|
||||||
Q_UNUSED( e );
|
|
||||||
|
|
||||||
if ( m_bgTile.isNull() || width() > m_bgTile.width() )
|
|
||||||
m_bgTile = TomahawkUtils::createTiledPixmap( width(), height(), QImage( RESPATH "images/playlist-header-tiled.png" ) );
|
|
||||||
|
|
||||||
if ( m_bgTile.isNull() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
QPainter p( this );
|
|
||||||
|
|
||||||
// Truncate bg pixmap and paint into bg
|
|
||||||
p.drawPixmap( rect(), m_bgTile, rect() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
InfoBar::changeEvent( QEvent* e )
|
InfoBar::changeEvent( QEvent* e )
|
||||||
|
@@ -69,7 +69,6 @@ signals:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent( QEvent* e );
|
void changeEvent( QEvent* e );
|
||||||
void paintEvent( QPaintEvent* e );
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onFilterEdited();
|
void onFilterEdited();
|
||||||
@@ -78,7 +77,6 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
Ui::InfoBar* ui;
|
Ui::InfoBar* ui;
|
||||||
|
|
||||||
QPixmap m_bgTile;
|
|
||||||
QPalette m_whitePal;
|
QPalette m_whitePal;
|
||||||
|
|
||||||
QList<Tomahawk::PlaylistUpdaterInterface*> m_updaters;;
|
QList<Tomahawk::PlaylistUpdaterInterface*> m_updaters;;
|
||||||
|
@@ -62,7 +62,7 @@ FlexibleHeader::FlexibleHeader( FlexibleView* parent )
|
|||||||
m_radioDetailed = new QRadioButton( modeWidget );
|
m_radioDetailed = new QRadioButton( modeWidget );
|
||||||
m_radioCloud = new QRadioButton( modeWidget );
|
m_radioCloud = new QRadioButton( modeWidget );
|
||||||
//for the CSS:
|
//for the CSS:
|
||||||
m_radioNormal->setObjectName( "radioNormal");
|
m_radioNormal->setObjectName( "radioNormal" );
|
||||||
m_radioCloud->setObjectName( "radioCloud" );
|
m_radioCloud->setObjectName( "radioCloud" );
|
||||||
|
|
||||||
m_radioNormal->setFocusPolicy( Qt::NoFocus );
|
m_radioNormal->setFocusPolicy( Qt::NoFocus );
|
||||||
|
@@ -86,16 +86,11 @@ BasicHeader::BasicHeader( QWidget* parent )
|
|||||||
|
|
||||||
setPalette( pal );
|
setPalette( pal );
|
||||||
setAutoFillBackground( true );
|
setAutoFillBackground( true );
|
||||||
|
|
||||||
if ( !s_tiledHeader )
|
|
||||||
s_tiledHeader = new QPixmap( TomahawkUtils::createTiledPixmap( 2000, height(), QImage( RESPATH "images/playlist-header-tiled.png" ) ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BasicHeader::~BasicHeader()
|
BasicHeader::~BasicHeader()
|
||||||
{
|
{
|
||||||
delete s_tiledHeader;
|
|
||||||
s_tiledHeader = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -118,23 +113,3 @@ BasicHeader::setPixmap( const QPixmap& p )
|
|||||||
{
|
{
|
||||||
m_imageLabel->setPixmap( p.scaledToHeight( m_imageLabel->height(), Qt::SmoothTransformation ) );
|
m_imageLabel->setPixmap( p.scaledToHeight( m_imageLabel->height(), Qt::SmoothTransformation ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
BasicHeader::paintEvent( QPaintEvent* )
|
|
||||||
{
|
|
||||||
if ( !s_tiledHeader || s_tiledHeader->isNull() || width() > s_tiledHeader->width() )
|
|
||||||
{
|
|
||||||
delete s_tiledHeader;
|
|
||||||
s_tiledHeader = new QPixmap( TomahawkUtils::createTiledPixmap( width(), height(), QImage( RESPATH "images/playlist-header-tiled.png" ) ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !s_tiledHeader || s_tiledHeader->isNull() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
QPainter p( this );
|
|
||||||
|
|
||||||
// Truncate bg pixmap and paint into bg
|
|
||||||
p.drawPixmap( rect(), *s_tiledHeader, rect() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -42,8 +42,6 @@ public slots:
|
|||||||
virtual void setPixmap( const QPixmap& p );
|
virtual void setPixmap( const QPixmap& p );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent( QPaintEvent* );
|
|
||||||
|
|
||||||
QLabel* m_imageLabel;
|
QLabel* m_imageLabel;
|
||||||
ElidedLabel* m_captionLabel;
|
ElidedLabel* m_captionLabel;
|
||||||
ElidedLabel* m_descriptionLabel;
|
ElidedLabel* m_descriptionLabel;
|
||||||
|
Reference in New Issue
Block a user