mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-22 23:14:59 -04:00
fix(tracker/gioui): make own TipArea ensuring tips don't stay around
Closes #141.
This commit is contained in:
parent
31007515b5
commit
6f1db6b392
@ -17,7 +17,6 @@ import (
|
||||
"gioui.org/text"
|
||||
"gioui.org/unit"
|
||||
"gioui.org/widget"
|
||||
"gioui.org/x/component"
|
||||
"github.com/vsariola/sointu/tracker"
|
||||
)
|
||||
|
||||
@ -27,7 +26,7 @@ type (
|
||||
history []widget.Press
|
||||
|
||||
requestClicks int
|
||||
TipArea component.TipArea // since almost all buttons have tooltips, we include the state for a tooltip here for convenience
|
||||
TipArea TipArea // since almost all buttons have tooltips, we include the state for a tooltip here for convenience
|
||||
}
|
||||
|
||||
ButtonStyle struct {
|
||||
@ -289,13 +288,6 @@ func (b *ToggleIconButton) Layout(gtx C) D {
|
||||
return b.IconButton.Layout(gtx)
|
||||
}
|
||||
|
||||
func Tooltip(th *Theme, tip string) component.Tooltip {
|
||||
tooltip := component.PlatformTooltip(&th.Material, tip)
|
||||
tooltip.Bg = th.Tooltip.Bg
|
||||
tooltip.Text.Color = th.Tooltip.Color
|
||||
return tooltip
|
||||
}
|
||||
|
||||
// Click executes a simple programmatic click.
|
||||
func (b *Clickable) Click() {
|
||||
b.requestClicks++
|
||||
|
Reference in New Issue
Block a user