1
0
Fork 0

- [GUI] added configuration directive to toggle visibility of TOC and streams frame.

This commit is contained in:
cage 2023-07-29 11:59:42 +02:00
parent 5d01e63969
commit c89389fa21
4 changed files with 27 additions and 4 deletions

View File

@ -167,6 +167,8 @@ gemini.preformatted.justification = left
# width in chars
toc.show = no
toc.maximum.width = 40
toc.minimum.width = 20
@ -183,6 +185,10 @@ toc.underline = no
toc.autoresize = yes
# stream frame
stream-frame.show = no
# Keybinding
# see: https://www.tcl.tk/man/tcl8.7/TkCmd/bind.html#M7

View File

@ -54,7 +54,8 @@
increase
decrease
reset
refresh)
refresh
stream-frame)
(defun load-config-file (&optional (virtual-filepath +client-conf-filename+)
(perform-missing-value-check nil))
@ -298,6 +299,12 @@
(gen-conf-justification gemini swconf:+key-preformatted-text+)
(swconf:gen-simple-access (toc-show-p
:transform-value-fn (lambda (a) (not (swconf:false-value-p a)))
:configuration-tree *client-configuration*)
swconf:+key-toc+
+key-show+)
(swconf:gen-simple-access (toc-maximum-width
:transform-value-fn (lambda (a)
(truncate (or (num-utils:safe-parse-number a)
@ -439,3 +446,9 @@
+key-wrapped+
+key-asterisk+)))
(not (swconf:false-value-p value))))
(swconf:gen-simple-access (stream-frame-show-p
:transform-value-fn (lambda (a) (not (swconf:false-value-p a)))
:configuration-tree *client-configuration*)
+key-stream-frame+
+key-show+)

View File

@ -1394,10 +1394,12 @@ local file paths."
(gui:grid info-text 0 0 :sticky :news)
(gui-goodies:gui-resize-grid-all info-frame)
(gui:grid tool-bar 0 0 :sticky :news)
(gui:add-pane gemini-paned-frame toc-frame)
(when (client-configuration:config-toc-show-p)
(gui:add-pane gemini-paned-frame toc-frame))
(gui:add-pane gemini-paned-frame gemtext-widget)
(gui:add-pane main-paned-frame gemini-paned-frame :weight 2)
(gui:add-pane main-paned-frame stream-frame)
(when (client-configuration:config-stream-frame-show-p)
(gui:add-pane main-paned-frame stream-frame))
(gui:grid main-paned-frame 1 0 :sticky :news)
(gui:grid search-frame 2 0 :sticky :news)
(gui:grid-forget search-frame)

View File

@ -3304,6 +3304,7 @@
:config-toc-minimum-width
:config-toc-autoresize-p
:toc-font-configuration
:config-toc-show-p
:get-keybinding
:config-keybinding-tour-shuffle
:config-keybinding-tour-manage
@ -3316,7 +3317,8 @@
:config-keybinding-bookmark-toggle
:config-keybinding-bookmark-show
:main-window-select-colors
:emphasize-wrapped-asterisk-p))
:emphasize-wrapped-asterisk-p
:config-stream-frame-show-p))
(defpackage :client-os-utils
(:use