1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 01:09:42 +01:00

Fix spinner graphic being cut off on certain DPI values.

This commit is contained in:
Teo Mrnjavac 2013-01-09 12:40:08 +01:00
parent 04e8132384
commit 93256dbea3

View File

@ -71,20 +71,21 @@ AccountWidget::AccountWidget( QWidget* parent )
idContLayout->addWidget( m_idLabel );
m_spinnerWidget = new QWidget( idContainer );
QSize spinnerSize = 16 > m_spinnerWidget->logicalDpiX() * .2 ?
QSize spinnerSize = 16 > TomahawkUtils::defaultFontHeight() ?
QSize( 16, 16 ) :
QSize( m_spinnerWidget->logicalDpiX() * .15,
m_spinnerWidget->logicalDpiX() * .15 );
QSize( TomahawkUtils::defaultFontHeight(),
TomahawkUtils::defaultFontHeight() );
m_spinnerWidget->setFixedSize( spinnerSize );
idContLayout->addWidget( m_spinnerWidget );
m_spinnerWidget->setContentsMargins( 0, 0, 0, 0 );
m_spinner = new AnimatedSpinner( m_spinnerWidget->size(), m_spinnerWidget );
m_spinnerWidget->setContentsMargins( 0, 1, 0, 0 );
m_spinner = new AnimatedSpinner( m_spinnerWidget->size() - QSize( 2, 2 ), m_spinnerWidget );
idContainer->setStyleSheet( QString( "QFrame {"
"border: 1px solid #e9e9e9;"
"border-radius: %1px;"
"background: #e9e9e9;"
"}" ).arg( idContainer->sizeHint().height() / 2 + 1 ) );
idContainer->setMinimumHeight( spinnerSize.height() + 6 /*margins*/ );
m_statusToggle = new SlideSwitchButton( this );
m_statusToggle->setContentsMargins( 0, 0, 0, 0 );