mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Merge branch 'leo-test'
This commit is contained in:
@@ -50,8 +50,6 @@ AudioControls::AudioControls( QWidget* parent )
|
|||||||
ui->setupUi( this );
|
ui->setupUi( this );
|
||||||
setAcceptDrops( true );
|
setAcceptDrops( true );
|
||||||
|
|
||||||
ui->buttonAreaLayout->setSpacing( 2 );
|
|
||||||
|
|
||||||
QFont font( ui->artistTrackLabel->font() );
|
QFont font( ui->artistTrackLabel->font() );
|
||||||
font.setPixelSize( 12 );
|
font.setPixelSize( 12 );
|
||||||
|
|
||||||
@@ -181,6 +179,15 @@ AudioControls::AudioControls( QWidget* parent )
|
|||||||
|
|
||||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) );
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) );
|
||||||
|
|
||||||
|
|
||||||
|
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 );
|
||||||
|
ui->stackedLayout->setSizeConstraint( QLayout::SetFixedSize );
|
||||||
|
|
||||||
onPlaybackStopped(); // initial state
|
onPlaybackStopped(); // initial state
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,6 +308,8 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
|||||||
/* m_playAction->setEnabled( false );
|
/* m_playAction->setEnabled( false );
|
||||||
m_pauseAction->setEnabled( true ); */
|
m_pauseAction->setEnabled( true ); */
|
||||||
|
|
||||||
|
ui->stackedLayout->setCurrentWidget( ui->pauseButton );
|
||||||
|
|
||||||
ui->pauseButton->setEnabled( true );
|
ui->pauseButton->setEnabled( true );
|
||||||
ui->pauseButton->setVisible( true );
|
ui->pauseButton->setVisible( true );
|
||||||
ui->playPauseButton->setVisible( false );
|
ui->playPauseButton->setVisible( false );
|
||||||
@@ -341,23 +350,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 );
|
|
||||||
ui->loveButton->setVisible( true );
|
ui->loveButton->setVisible( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,10 +377,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 );
|
|
||||||
ui->loveButton->setEnabled( false );
|
ui->loveButton->setEnabled( false );
|
||||||
ui->loveButton->setVisible( false );
|
ui->loveButton->setVisible( false );
|
||||||
|
|
||||||
|
@@ -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>0</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