mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-05 16:42:26 +02:00
Added the love button.
Its in an odd place for now but Muesli is going to correct the positioning manually. We need to get this button to switch to notLoved.png when a track is no longer loved. More implementation coming soon. For now this will send love status to lastfm.
This commit is contained in:
parent
d7d97d60db
commit
3efe0ff22b
BIN
data/images/loved.png
Normal file
BIN
data/images/loved.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
data/images/not-loved.png
Normal file
BIN
data/images/not-loved.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@ -7,6 +7,8 @@
|
||||
<file>./data/images/back-pressed.png</file>
|
||||
<file>./data/images/back-rest.png</file>
|
||||
<file>./data/images/cover-shadow.png</file>
|
||||
<file>./data/images/loved.png</file>
|
||||
<file>./data/images/not-loved.png</file>
|
||||
<file>./data/images/magnifying-glass.png</file>
|
||||
<file>./data/images/no-album-art-placeholder.png</file>
|
||||
<file>./data/images/now-playing-panel.png</file>
|
||||
|
@ -79,6 +79,7 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
ui->repeatButton->setPixmap( RESPATH "images/repeat-off-pressed.png", QIcon::Off, QIcon::Active );
|
||||
ui->volumeLowButton->setPixmap( RESPATH "images/volume-icon-muted.png" );
|
||||
ui->volumeHighButton->setPixmap( RESPATH "images/volume-icon-full.png" );
|
||||
ui->loveButton->setPixmap( RESPATH "images/not-loved.png" );
|
||||
|
||||
ui->ownerLabel->setForegroundRole( QPalette::Dark );
|
||||
ui->metaDataArea->setStyleSheet( "QWidget#metaDataArea {\nborder-width: 4px;\nborder-image: url(" RESPATH "images/now-playing-panel.png) 4 4 4 4 stretch stretch; }" );
|
||||
@ -150,6 +151,7 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
connect( ui->artistTrackLabel, SIGNAL( clickedArtist() ), SLOT( onArtistClicked() ) );
|
||||
connect( ui->artistTrackLabel, SIGNAL( clickedTrack() ), SLOT( onTrackClicked() ) );
|
||||
connect( ui->albumLabel, SIGNAL( clickedAlbum() ), SLOT( onAlbumClicked() ) );
|
||||
connect( ui->loveButton, SIGNAL( clicked() ), SLOT( onLoveButtonClicked() ) );
|
||||
|
||||
// <From AudioEngine>
|
||||
connect( AudioEngine::instance(), SIGNAL( loading( Tomahawk::result_ptr ) ), SLOT( onPlaybackLoading( Tomahawk::result_ptr ) ) );
|
||||
@ -280,6 +282,7 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
||||
ui->albumLabel->setResult( result );
|
||||
ui->ownerLabel->setText( result->friendlySource() );
|
||||
ui->coverImage->setPixmap( m_defaultCover );
|
||||
ui->loveButton->setVisible( true );
|
||||
|
||||
ui->timeLabel->setText( TomahawkUtils::timeToString( 0 ) );
|
||||
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( result->duration() ) );
|
||||
@ -321,6 +324,7 @@ AudioControls::onPlaybackResumed()
|
||||
ui->playPauseButton->setEnabled( false );
|
||||
ui->pauseButton->setVisible( true );
|
||||
ui->pauseButton->setEnabled( true );
|
||||
ui->loveButton->setVisible( true );
|
||||
}
|
||||
|
||||
|
||||
@ -336,6 +340,7 @@ AudioControls::onPlaybackStopped()
|
||||
ui->timeLeftLabel->setText( "" );
|
||||
ui->coverImage->setPixmap( QPixmap() );
|
||||
ui->seekSlider->setVisible( false );
|
||||
ui->loveButton->setVisible( false );
|
||||
|
||||
ui->pauseButton->setVisible( false );
|
||||
ui->pauseButton->setEnabled( false );
|
||||
|
@ -250,7 +250,20 @@
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ImageButton" name="loveButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>love</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ownerLabel">
|
||||
<property name="font">
|
||||
|
Loading…
x
Reference in New Issue
Block a user