2020-10-14 21:54:51 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2021-03-06 20:23:17 +01:00
|
|
|
"fyne.io/fyne/v2"
|
|
|
|
"fyne.io/fyne/v2/container"
|
|
|
|
"fyne.io/fyne/v2/theme"
|
|
|
|
"fyne.io/fyne/v2/widget"
|
2020-10-14 21:54:51 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
type toolbarDisk struct {
|
|
|
|
name string
|
|
|
|
}
|
|
|
|
|
|
|
|
func newToolbarDisk(name string) *toolbarDisk {
|
|
|
|
var tbd toolbarDisk
|
|
|
|
tbd.name = name
|
|
|
|
return &tbd
|
|
|
|
}
|
|
|
|
|
|
|
|
func (tbd *toolbarDisk) ToolbarObject() fyne.CanvasObject {
|
2021-03-06 20:23:17 +01:00
|
|
|
return container.NewHBox(
|
2020-10-14 21:54:51 +02:00
|
|
|
widget.NewIcon(theme.VolumeUpIcon()),
|
|
|
|
widget.NewLabel(tbd.name),
|
|
|
|
widget.NewLabel("track 12"),
|
|
|
|
widget.NewButton("eject", nil),
|
|
|
|
)
|
|
|
|
}
|