settingsEditorToolbarBase is the base toolbar configuration function used in [SettingsEditor].
(p *tree.Plan)
| 13 | // settingsEditorToolbarBase is the base toolbar configuration |
| 14 | // function used in [SettingsEditor]. |
| 15 | func settingsEditorToolbarBase(p *tree.Plan) { |
| 16 | tree.Add(p, func(w *FuncButton) { |
| 17 | w.SetFunc(AppearanceSettings.SaveScreenZoom).SetIcon(icons.ZoomIn) |
| 18 | w.SetAfterFunc(func() { |
| 19 | AppearanceSettings.Apply() |
| 20 | UpdateAll() |
| 21 | }) |
| 22 | |
| 23 | p.Parent.(*Toolbar).AddOverflowMenu(func(m *Scene) { |
| 24 | NewFuncButton(m).SetFunc(resetAllSettings).SetConfirm(true).SetText("Reset settings").SetIcon(icons.Delete) |
| 25 | |
| 26 | NewFuncButton(m).SetFunc(AppearanceSettings.deleteSavedWindowGeoms).SetConfirm(true).SetIcon(icons.Delete) |
| 27 | NewFuncButton(m).SetFunc(ProfileToggle).SetShortcut("Control+Alt+R").SetText("Profile performance").SetIcon(icons.Analytics) |
| 28 | NewSeparator(m) |
| 29 | }) |
| 30 | }) |
| 31 | } |
| 32 | |
| 33 | // SettingsWindow opens a window for editing user settings. |
| 34 | func SettingsWindow() { //types:add |
no test coverage detected