bunker/client/internal/widgets/toolbar_label.go
2025-09-13 09:23:47 +05:00

22 lines
476 B
Go

package widgets
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/widget"
)
// ToolbarLabel is a label widget for toolbar.
type ToolbarLabel struct {
*widget.Label
}
// NewToolbarLabelWithLabel creates new toolbar label with passed label as base widget.
func NewToolbarLabelWithLabel(label *widget.Label) widget.ToolbarItem {
return &ToolbarLabel{label}
}
// ToolbarObject returns toolbar item.
func (tl *ToolbarLabel) ToolbarObject() fyne.CanvasObject {
return tl.Label
}