diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 00:51:15 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 00:51:15 +0200 |
| commit | 5418ba6bc5c653b6a99572c6ece6abbf57836c43 (patch) | |
| tree | ae0a430c468890770d20f531c3a026937c9bb948 /gui/internal/ui/settings.go | |
| parent | ca0b703526151149d060d6d38f307e9e38c3dcd2 (diff) | |
| download | krino-5418ba6bc5c653b6a99572c6ece6abbf57836c43.tar.gz krino-5418ba6bc5c653b6a99572c6ece6abbf57836c43.zip | |
gui: coloured actions with headers, a filter over the plan, bulk trash or delete
Diffstat (limited to 'gui/internal/ui/settings.go')
| -rw-r--r-- | gui/internal/ui/settings.go | 20 |
1 files changed, 11 insertions, 9 deletions
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) |
