LabelSwatch's label is not selectable, to match LabelCheckbox

This commit is contained in:
Sasha Koshka 2024-08-16 18:26:13 -04:00
parent 611705fa0d
commit f4a3cb3c00

View File

@ -24,6 +24,8 @@ func NewLabelSwatch (value color.Color, text string) *LabelSwatch {
box.SetRole(tomo.R("objects", "LabelSwatch")) box.SetRole(tomo.R("objects", "LabelSwatch"))
box.swatch.label = text box.swatch.label = text
box.label.SetAttr(tomo.AAlign(tomo.AlignStart, tomo.AlignMiddle)) box.label.SetAttr(tomo.AAlign(tomo.AlignStart, tomo.AlignMiddle))
box.label.SetSelectable(false)
box.label.SetFocusable(false)
box.Add(box.swatch) box.Add(box.swatch)
box.Add(box.label) box.Add(box.label)
box.SetAttr(tomo.ALayout(layouts.Row { false, true })) box.SetAttr(tomo.ALayout(layouts.Row { false, true }))