mirror of
https://codeberg.org/cage/tinmop/
synced 2025-01-22 03:25:41 +01:00
- [GUI] added configuration directive to enable or disable TOC autoresize.
This commit is contained in:
parent
0e7d9f9e0e
commit
95e9e2a9c3
@ -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
|
||||
|
@ -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*)
|
||||
|
@ -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"))
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user