izapple2/frontend/a2fyne/toolbarDisk.go

28 lines
495 B
Go
Raw Permalink Normal View History

2020-10-14 19:54:51 +00:00
package main
import (
2021-03-06 19:23:17 +00:00
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
2020-10-14 19:54:51 +00: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 19:23:17 +00:00
return container.NewHBox(
2020-10-14 19:54:51 +00:00
widget.NewIcon(theme.VolumeUpIcon()),
widget.NewLabel(tbd.name),
widget.NewLabel("track 12"),
widget.NewButton("eject", nil),
)
}