mirror of
https://codeberg.org/cage/tinmop/
synced 2025-01-04 01:19:27 +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))
|
||||
(max-number-length (length longest-number))
|
||||
(max-non-padded-text-size (+ max-text-length max-number-length))
|
||||
(toc-entries-text (loop for text in toc-text
|
||||
for number in toc-numbers
|
||||
collect
|
||||
(let* ((text-length (+ (length text)
|
||||
(length number)))
|
||||
(padding-size (- max-non-padded-text-size
|
||||
text-length))
|
||||
(padding (make-string padding-size
|
||||
:initial-element (swconf:gemini-toc-padding-char))))
|
||||
(strcat number
|
||||
padding
|
||||
text)))))
|
||||
(toc-entries-text
|
||||
(loop for text in toc-text
|
||||
for number in toc-numbers
|
||||
collect
|
||||
(let* ((prefix (right-padding number
|
||||
max-number-length
|
||||
:padding-char
|
||||
(swconf:gemini-toc-padding-char))))
|
||||
(strcat prefix text)))))
|
||||
(values
|
||||
(loop for toc-entry in toc
|
||||
for text in toc-entries-text
|
||||
|
Loading…
Reference in New Issue
Block a user