mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
Try harder to fix audiocontrol flickering
This commit is contained in:
@@ -39,7 +39,12 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
{
|
||||
ui->setupUi( this );
|
||||
|
||||
ui->buttonAreaLayout->setSpacing( 2 );
|
||||
ui->buttonAreaLayout->setSpacing( 0 );
|
||||
ui->stackedLayout->setSpacing( 0 );
|
||||
ui->stackedLayout->setContentsMargins( 0, 0, 0, 0 );
|
||||
ui->stackedLayout->setMargin( 0 );
|
||||
ui->playPauseButton->setContentsMargins( 0, 0, 0, 0 );
|
||||
ui->pauseButton->setContentsMargins( 0, 0, 0, 0 );
|
||||
|
||||
QFont font( ui->artistTrackLabel->font() );
|
||||
font.setPixelSize( 12 );
|
||||
@@ -288,10 +293,7 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
||||
/* m_playAction->setEnabled( false );
|
||||
m_pauseAction->setEnabled( true ); */
|
||||
|
||||
ui->pauseButton->setEnabled( true );
|
||||
ui->pauseButton->setVisible( true );
|
||||
ui->playPauseButton->setVisible( false );
|
||||
ui->playPauseButton->setEnabled( false );
|
||||
ui->stackedLayout->setCurrentWidget( ui->pauseButton );
|
||||
}
|
||||
|
||||
|
||||
@@ -301,23 +303,16 @@ AudioControls::onPlaybackPaused()
|
||||
/* m_pauseAction->setEnabled( false );
|
||||
m_playAction->setEnabled( true ); */
|
||||
|
||||
ui->pauseButton->setVisible( false );
|
||||
ui->pauseButton->setEnabled( false );
|
||||
ui->playPauseButton->setEnabled( true );
|
||||
ui->playPauseButton->setVisible( true );
|
||||
ui->stackedLayout->setCurrentWidget( ui->playPauseButton );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onPlaybackResumed()
|
||||
{
|
||||
/* m_playAction->setEnabled( false );
|
||||
m_pauseAction->setEnabled( true ); */
|
||||
|
||||
ui->playPauseButton->setVisible( false );
|
||||
ui->playPauseButton->setEnabled( false );
|
||||
ui->pauseButton->setVisible( true );
|
||||
ui->pauseButton->setEnabled( true );
|
||||
ui->stackedLayout->setCurrentWidget( ui->pauseButton );
|
||||
}
|
||||
|
||||
|
||||
@@ -334,10 +329,7 @@ AudioControls::onPlaybackStopped()
|
||||
ui->coverImage->setPixmap( QPixmap() );
|
||||
ui->seekSlider->setVisible( false );
|
||||
|
||||
ui->pauseButton->setVisible( false );
|
||||
ui->pauseButton->setEnabled( false );
|
||||
ui->playPauseButton->setEnabled( true );
|
||||
ui->playPauseButton->setVisible( true );
|
||||
ui->stackedLayout->setCurrentWidget( ui->playPauseButton );
|
||||
|
||||
/* m_pauseAction->setEnabled( false );
|
||||
m_playAction->setEnabled( true ); */
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>939</width>
|
||||
<width>929</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -60,7 +60,7 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="buttonAreaLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@@ -79,6 +79,11 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QStackedLayout" name="stackedLayout">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="ImageButton" name="playPauseButton">
|
||||
<property name="text">
|
||||
@@ -93,6 +98,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ImageButton" name="nextButton">
|
||||
<property name="text">
|
||||
@@ -101,7 +108,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
Reference in New Issue
Block a user