diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-18 08:34:16 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-18 08:34:16 +0300 |
| commit | e2f45921c45c9322c2ddb679d0511ba20772dcae (patch) | |
| tree | 85e13d7d4127bd1fdc4821427782475095c6f289 /internal/gui/audio_player.go | |
| parent | 85ee3559fcdee46a21c4e9a5ef9ec519d997c447 (diff) | |
gui improvements
Diffstat (limited to 'internal/gui/audio_player.go')
| -rw-r--r-- | internal/gui/audio_player.go | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/internal/gui/audio_player.go b/internal/gui/audio_player.go index f36eddf..63428bd 100644 --- a/internal/gui/audio_player.go +++ b/internal/gui/audio_player.go @@ -9,6 +9,7 @@ import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/layout" + "fyne.io/fyne/v2/theme" "fyne.io/fyne/v2/widget" ) @@ -39,10 +40,21 @@ func NewAudioPlayer() *AudioPlayer { p.playButton.Disable() p.stopButton.Disable() - // Create container - p.container = container.NewHBox( + // Create containers with tooltips + playContainer := container.NewVBox( p.playButton, + widget.NewLabelWithStyle("Play (p)", fyne.TextAlignCenter, fyne.TextStyle{Italic: true}), + ) + + stopContainer := container.NewVBox( p.stopButton, + widget.NewLabelWithStyle("Stop", fyne.TextAlignCenter, fyne.TextStyle{Italic: true}), + ) + + // Create main container + p.container = container.NewHBox( + playContainer, + stopContainer, layout.NewSpacer(), p.statusLabel, ) @@ -164,7 +176,7 @@ func (p *AudioPlayer) startPlayback() error { // Playback finished normally fyne.Do(func() { p.isPlaying = false - p.playButton.SetText("▶ Play (p)") + p.playButton.SetIcon(theme.MediaPlayIcon()) p.stopButton.Disable() p.statusLabel.SetText("Finished: " + filepath.Base(p.audioFile)) }) |
