1
0
Fork 0

- [GUI] added configuration directive to enable or disable TOC autoresize.

This commit is contained in:
cage 2023-05-20 17:31:11 +02:00
parent 0e7d9f9e0e
commit 95e9e2a9c3
4 changed files with 13 additions and 2 deletions

View File

@ -181,6 +181,8 @@ toc.slant = roman
toc.underline = no
toc.autoresize = yes
# Keybinding
# see: https://www.tcl.tk/man/tcl8.7/TkCmd/bind.html#M7

View File

@ -47,7 +47,8 @@
select
emphasize
wrapped
asterisk)
asterisk
autoresize)
(defun load-config-file (&optional (virtual-filepath +client-conf-filename+)
(perform-missing-value-check nil))
@ -284,6 +285,12 @@
swconf:+key-minimum+
swconf:+key-width+)
(swconf:gen-simple-access (toc-autoresize-p
:transform-value-fn (lambda (a) (not (swconf:false-value-p a)))
:configuration-tree *client-configuration*)
swconf:+key-toc+
+key-autoresize+)
(swconf:gen-simple-access (gemtext-padding
:transform-value-fn (lambda (a) (parse-integer a))
:configuration-tree *client-configuration*)

View File

@ -1287,7 +1287,8 @@
listbox-items))
(width-pixel (gui:font-measure font (strcat longest-value "MM"))))
(gui:configure inner-listbox :width new-width)
(gui:sash-place gemini-paned-frame 0 width-pixel))))
(when (client-configuration:config-toc-autoresize-p)
(gui:sash-place gemini-paned-frame 0 width-pixel)))))
(defun print-info-message (message &key
(color (gui-goodies:parse-color "black"))

View File

@ -3289,6 +3289,7 @@
:gemini-preformatted-text-justification
:config-toc-maximum-width
:config-toc-minimum-width
:config-toc-autoresize-p
:toc-font-configuration
:get-keybinding
:config-keybinding-tour-shuffle