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