Commit 69edc479 authored by Nate Graham's avatar Nate Graham
Browse files

Use dynamic tooltip text for play & pause buttons

This way the tooltip always tells you what will happen when you press
the button.
parent 7accddfc
Pipeline #169082 passed with stage
in 5 minutes and 32 seconds
......@@ -63,7 +63,7 @@ BasePlayerControl {
FlatButtonWithToolTip {
id: playPauseButton
enabled: playEnabled
text: i18nc("toggle play and pause for the audio player", "Toggle Play and Pause")
text: musicWidget.isPlaying ? i18nc("Pause any media that is playing", "Pause") : i18nc("Start playing media", "Play")
icon.name: musicWidget.isPlaying? "media-playback-pause" : "media-playback-start"
onClicked: musicWidget.isPlaying ? musicWidget.pause() : musicWidget.play()
}
......
......@@ -238,7 +238,7 @@ BasePlayerControl {
Layout.maximumWidth: height
Layout.preferredWidth: height
enabled: playEnabled
text: i18nc("toggle play and pause for the audio player", "Toggle Play and Pause")
text: musicWidget.isPlaying ? i18nc("Pause any media that is playing", "Pause") : i18nc("Start playing media", "Play")
onClicked: musicWidget.isPlaying ? musicWidget.pause() : musicWidget.play()
icon.name: musicWidget.isPlaying? "media-playback-pause" : "media-playback-start"
icon.width: Kirigami.Units.gridUnit
......
......@@ -330,7 +330,7 @@ BasePlayerControl {
Layout.maximumWidth: height
Layout.preferredWidth: height
enabled: playEnabled
text: i18nc("toggle play and pause for the audio player", "Toggle Play and Pause")
text: trackPlayer.isPlaying ? i18nc("Pause any media that is playing", "Pause") : i18nc("Start playing media", "Play")
onClicked: trackPlayer.isPlaying ? trackPlayer.pause() : trackPlayer.play()
icon.name: trackPlayer.isPlaying? "media-playback-pause" : "media-playback-start"
icon.width: Kirigami.Units.gridUnit
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment