mirror of
https://codeberg.org/cage/tinmop/
synced 2025-01-06 01:36:49 +01:00
- [GUI] improved formatting of TOC entries.
This commit is contained in:
parent
95e9e2a9c3
commit
14525c2f1b
@ -453,18 +453,15 @@
|
|||||||
(longest-number (find-longest-string toc-numbers))
|
(longest-number (find-longest-string toc-numbers))
|
||||||
(max-number-length (length longest-number))
|
(max-number-length (length longest-number))
|
||||||
(max-non-padded-text-size (+ max-text-length max-number-length))
|
(max-non-padded-text-size (+ max-text-length max-number-length))
|
||||||
(toc-entries-text (loop for text in toc-text
|
(toc-entries-text
|
||||||
for number in toc-numbers
|
(loop for text in toc-text
|
||||||
collect
|
for number in toc-numbers
|
||||||
(let* ((text-length (+ (length text)
|
collect
|
||||||
(length number)))
|
(let* ((prefix (right-padding number
|
||||||
(padding-size (- max-non-padded-text-size
|
max-number-length
|
||||||
text-length))
|
:padding-char
|
||||||
(padding (make-string padding-size
|
(swconf:gemini-toc-padding-char))))
|
||||||
:initial-element (swconf:gemini-toc-padding-char))))
|
(strcat prefix text)))))
|
||||||
(strcat number
|
|
||||||
padding
|
|
||||||
text)))))
|
|
||||||
(values
|
(values
|
||||||
(loop for toc-entry in toc
|
(loop for toc-entry in toc
|
||||||
for text in toc-entries-text
|
for text in toc-entries-text
|
||||||
|
Loading…
Reference in New Issue
Block a user