mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 23:39:42 +01:00
* Static gradient for InfoBar speeds up window resizing.
This commit is contained in:
parent
c9c99d58ab
commit
fa6579f8f0
@ -77,6 +77,13 @@ InfoBar::InfoBar( QWidget* parent )
|
||||
|
||||
ui->horizontalLayout->addWidget( m_searchWidget );
|
||||
|
||||
QLinearGradient gradient = QLinearGradient( QPoint( 0, 0 ), QPoint( 500, 200 ) ); //HACK
|
||||
gradient.setColorAt( 0.0, QColor( 100, 100, 100 ) );
|
||||
gradient.setColorAt( 0.8, QColor( 63, 63, 63 ) );
|
||||
|
||||
QPalette p = palette();
|
||||
p.setBrush( QPalette::Window, QBrush( gradient ) );
|
||||
setPalette( p );
|
||||
setAutoFillBackground( true );
|
||||
|
||||
connect( ViewManager::instance(), SIGNAL( filterAvailable( bool ) ), SLOT( setFilterAvailable( bool ) ) );
|
||||
@ -162,18 +169,3 @@ InfoBar::changeEvent( QEvent* e )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
InfoBar::resizeEvent( QResizeEvent* e )
|
||||
{
|
||||
QWidget::resizeEvent( e );
|
||||
|
||||
QLinearGradient gradient = QLinearGradient( contentsRect().topLeft(), contentsRect().bottomRight() );
|
||||
gradient.setColorAt( 0.0, QColor( 100, 100, 100 ) );
|
||||
gradient.setColorAt( 1.0, QColor( 63, 63, 63 ) );
|
||||
|
||||
QPalette p = palette();
|
||||
p.setBrush( QPalette::Window, QBrush( gradient ) );
|
||||
setPalette( p );
|
||||
}
|
||||
|
@ -55,7 +55,6 @@ signals:
|
||||
|
||||
protected:
|
||||
void changeEvent( QEvent* e );
|
||||
void resizeEvent( QResizeEvent* e );
|
||||
|
||||
private slots:
|
||||
void onFilterEdited();
|
||||
|
Loading…
x
Reference in New Issue
Block a user