mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-13 04:21:51 +02:00
* Now using a smaller version of the info-button icon.
This commit is contained in:
parent
cdddb3bdf4
commit
d271be5ad9
@ -48,7 +48,7 @@ SourceTreeItemWidget::SourceTreeItemWidget( const source_ptr& source, QWidget* p
|
||||
ui->infoLabel->setText( "???" );
|
||||
|
||||
ui->onOffButton->hide();
|
||||
ui->infoButton->setPixmap( RESPATH "images/source-info.png" );
|
||||
ui->infoButton->setPixmap( QPixmap( RESPATH "images/source-info.png" ) .scaledToHeight( 32, Qt::SmoothTransformation ) );
|
||||
}
|
||||
|
||||
ui->nameLabel->setText( displayname );
|
||||
|
@ -33,7 +33,7 @@ ImageButton::ImageButton( const QString& path, QWidget* parent )
|
||||
void
|
||||
ImageButton::init( const QPixmap& p )
|
||||
{
|
||||
setPixmap( p );
|
||||
setPixmap( p, QIcon::Off );
|
||||
m_sizeHint = p.size();
|
||||
updateGeometry();
|
||||
}
|
||||
@ -46,6 +46,13 @@ ImageButton::setPixmap( const QString& path )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ImageButton::setPixmap( const QPixmap& pixmap )
|
||||
{
|
||||
init( pixmap );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ImageButton::paintEvent( QPaintEvent* event )
|
||||
{
|
||||
|
@ -17,8 +17,10 @@ public:
|
||||
explicit ImageButton( const QString& path, QWidget* parent = 0 );
|
||||
|
||||
void setPixmap( const QString& path );
|
||||
void setPixmap( const QPixmap& pixmap );
|
||||
|
||||
void setPixmap( const QString&, const QIcon::State, QIcon::Mode = QIcon::Normal );
|
||||
void setPixmap( const QPixmap&, const QIcon::State = QIcon::Off, QIcon::Mode = QIcon::Normal );
|
||||
void setPixmap( const QPixmap&, const QIcon::State, QIcon::Mode = QIcon::Normal );
|
||||
|
||||
virtual QSize sizeHint() const { return m_sizeHint; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user