22 lines
476 B
Go
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
|
||
|
}
|