MCPcopy Create free account
hub / github.com/cogentcore/core / TestButtonShortcutWithTooltip

Function TestButtonShortcutWithTooltip

core/button_test.go:79–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77}
78
79func TestButtonShortcutWithTooltip(t *testing.T) {
80 b := NewBody()
81 bt := NewButton(b).SetShortcut("Command+S")
82 bt.SetTooltip("Test")
83 tt, _ := bt.WidgetTooltip(image.Point{})
84 assert.Equal(t, "[Ctrl+S] Test", tt)
85}
86
87func TestButtonShortcutKey(t *testing.T) {
88 b := NewBody()

Callers

nothing calls this directly

Calls 6

NewBodyFunction · 0.85
NewButtonFunction · 0.85
SetShortcutMethod · 0.80
SetTooltipMethod · 0.80
EqualMethod · 0.80
WidgetTooltipMethod · 0.65

Tested by

no test coverage detected