Replace pause and play buttons with combined pause/play
The separate pause and play buttons necessitated changing between them to signal that state had changed. Replacing it with a combined pause/play button sidesteps all the issues in syncing up when which icon should be shown.
This commit is contained in:
@@ -26,10 +26,7 @@ GroupBox {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
property bool playButtonIsPlay: false
|
||||
|
||||
property string playButtonPath: "outline_play_arrow_white_24dp.svg"
|
||||
property string pauseButtonPath: "outline_pause_white_24dp.svg"
|
||||
property string playPauseButtonPath: "outline_play_pause_white_24dp.svg"
|
||||
property string stopButtonPath: "outline_stop_white_24dp.svg"
|
||||
property string previousButtonPath: "outline_skip_previous_white_24dp.svg"
|
||||
property string nextButtonPath: "outline_skip_next_white_24dp.svg"
|
||||
@@ -47,24 +44,14 @@ GroupBox {
|
||||
imagePath: parent.stopButtonPath
|
||||
onClicked: {
|
||||
UtilitiesTabController.sendMediaStopSong()
|
||||
playPauseSongButton.contentItem.source = parent.playButtonPath
|
||||
parent.playButtonIsPlay = true
|
||||
}
|
||||
}
|
||||
|
||||
MediaButton {
|
||||
id: playPauseSongButton
|
||||
imagePath: parent.pauseButtonPath
|
||||
imagePath: parent.playPauseButtonPath
|
||||
onClicked: {
|
||||
UtilitiesTabController.sendMediaPausePlay()
|
||||
if (parent.playButtonIsPlay) {
|
||||
playPauseSongButton.contentItem.source = parent.pauseButtonPath
|
||||
parent.playButtonIsPlay = false
|
||||
} else {
|
||||
playPauseSongButton.contentItem.source = parent.playButtonPath
|
||||
parent.playButtonIsPlay = true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path fill="white" d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/></svg>
|
||||
|
Before Width: | Height: | Size: 184 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path fill="white" d="M10 8.64L15.27 12 10 15.36V8.64M8 5v14l11-7L8 5z"/></svg>
|
||||
|
Before Width: | Height: | Size: 201 B |
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;}
|
||||
.st1{fill:#FFFFFF;}
|
||||
</style>
|
||||
<path class="st0" d="M0,0h24v24H0V0z"/>
|
||||
<path class="st1" d="M5,8.6l5.3,3.4L5,15.4V8.6 M3,5v14l11-7L3,5z"/>
|
||||
<path class="st1" d="M14,19h2.3V5H14V19z M18.7,5v14H21V5H18.7z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 598 B |
Reference in New Issue
Block a user