mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 22:56:42 +02:00
Fix spinner graphic being cut off on certain DPI values.
This commit is contained in:
@@ -71,20 +71,21 @@ AccountWidget::AccountWidget( QWidget* parent )
|
|||||||
idContLayout->addWidget( m_idLabel );
|
idContLayout->addWidget( m_idLabel );
|
||||||
|
|
||||||
m_spinnerWidget = new QWidget( idContainer );
|
m_spinnerWidget = new QWidget( idContainer );
|
||||||
QSize spinnerSize = 16 > m_spinnerWidget->logicalDpiX() * .2 ?
|
QSize spinnerSize = 16 > TomahawkUtils::defaultFontHeight() ?
|
||||||
QSize( 16, 16 ) :
|
QSize( 16, 16 ) :
|
||||||
QSize( m_spinnerWidget->logicalDpiX() * .15,
|
QSize( TomahawkUtils::defaultFontHeight(),
|
||||||
m_spinnerWidget->logicalDpiX() * .15 );
|
TomahawkUtils::defaultFontHeight() );
|
||||||
m_spinnerWidget->setFixedSize( spinnerSize );
|
m_spinnerWidget->setFixedSize( spinnerSize );
|
||||||
idContLayout->addWidget( m_spinnerWidget );
|
idContLayout->addWidget( m_spinnerWidget );
|
||||||
m_spinnerWidget->setContentsMargins( 0, 0, 0, 0 );
|
m_spinnerWidget->setContentsMargins( 0, 1, 0, 0 );
|
||||||
m_spinner = new AnimatedSpinner( m_spinnerWidget->size(), m_spinnerWidget );
|
m_spinner = new AnimatedSpinner( m_spinnerWidget->size() - QSize( 2, 2 ), m_spinnerWidget );
|
||||||
|
|
||||||
idContainer->setStyleSheet( QString( "QFrame {"
|
idContainer->setStyleSheet( QString( "QFrame {"
|
||||||
"border: 1px solid #e9e9e9;"
|
"border: 1px solid #e9e9e9;"
|
||||||
"border-radius: %1px;"
|
"border-radius: %1px;"
|
||||||
"background: #e9e9e9;"
|
"background: #e9e9e9;"
|
||||||
"}" ).arg( idContainer->sizeHint().height() / 2 + 1 ) );
|
"}" ).arg( idContainer->sizeHint().height() / 2 + 1 ) );
|
||||||
|
idContainer->setMinimumHeight( spinnerSize.height() + 6 /*margins*/ );
|
||||||
|
|
||||||
m_statusToggle = new SlideSwitchButton( this );
|
m_statusToggle = new SlideSwitchButton( this );
|
||||||
m_statusToggle->setContentsMargins( 0, 0, 0, 0 );
|
m_statusToggle->setContentsMargins( 0, 0, 0, 0 );
|
||||||
|
Reference in New Issue
Block a user