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