From 5418ba6bc5c653b6a99572c6ece6abbf57836c43 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 17 Sep 2026 00:51:15 +0200 Subject: gui: coloured actions with headers, a filter over the plan, bulk trash or delete --- gui/internal/ui/settings.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'gui/internal/ui/settings.go') diff --git a/gui/internal/ui/settings.go b/gui/internal/ui/settings.go index 2db3450..732caf9 100644 --- a/gui/internal/ui/settings.go +++ b/gui/internal/ui/settings.go @@ -68,33 +68,35 @@ func (w *Window) showSettings() { box.Append(heading("This window")) prefs := w.prefs - font := gtk.NewSpinButtonWithRange(0, 32, 1) - font.SetValue(float64(prefs.FontSize)) - font.SetTooltipText("the editor's font size in points; 0 keeps the theme's") colours := gtk.NewCheckButtonWithLabel("colour the configuration in the Text tab") colours.SetActive(prefs.Colours) + colours.SetTooltipText("paint comments, strings, form heads and actions in the Text sub-tab") preview := gtk.NewCheckButtonWithLabel("show the file behind the selected row") preview.SetActive(prefs.Preview) + preview.SetTooltipText("show the selected file under its explanation: a picture, a PDF's first page, or the first lines of text") selectAll := gtk.NewCheckButtonWithLabel("a scanned plan starts with every file checked") selectAll.SetActive(prefs.SelectAll) - box.Append(field("editor font", font)) + selectAll.SetTooltipText("a freshly scanned plan starts with every file that can be acted on checked, as the terminal review does") + previewHeight := gtk.NewSpinButtonWithRange(80, 2000, 20) + previewHeight.SetValue(float64(prefs.PreviewHeight)) + previewHeight.SetTooltipText("how tall the preview under an explanation is, in pixels; dragging the divider above it does the same") + box.Append(field("preview height", previewHeight)) box.Append(colours) box.Append(preview) box.Append(selectAll) apply := func() { p := model.Prefs{ - FontSize: int(font.Value()), - Colours: colours.Active(), - Preview: preview.Active(), - SelectAll: selectAll.Active(), + Colours: colours.Active(), + Preview: preview.Active(), + SelectAll: selectAll.Active(), + PreviewHeight: int(previewHeight.Value()), } w.applyPrefs(p) if err := p.Save(); err != nil { w.setStatus("settings: %v", err) } } - font.ConnectValueChanged(apply) colours.ConnectToggled(apply) preview.ConnectToggled(apply) selectAll.ConnectToggled(apply) -- cgit v1.3