1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-12 07:30:34 +01:00

- added configuration directive to scale inlined images.

This commit is contained in:
cage 2023-09-09 15:21:27 +02:00
parent b77115d540
commit 8aecf478b4
4 changed files with 19 additions and 1 deletions

View File

@ -12,6 +12,8 @@ icons.scaling = 1
# gemini browser # gemini browser
gemini.image.inline.relative.scaling = 1/3
gemini.favicon = "🌍" gemini.favicon = "🌍"
gemini.main-window.select.background = #f2d8f4 gemini.main-window.select.background = #f2d8f4

View File

@ -58,6 +58,9 @@
decrease decrease
reset reset
refresh refresh
image
inline
relative
stream-frame) stream-frame)
(defun load-config-file (&optional (virtual-filepath +client-conf-filename+) (defun load-config-file (&optional (virtual-filepath +client-conf-filename+)
@ -465,3 +468,14 @@
:configuration-tree *client-configuration*) :configuration-tree *client-configuration*)
+key-stream-frame+ +key-stream-frame+
+key-show+) +key-show+)
(swconf:gen-simple-access (inline-scaling-ratio
:transform-value-fn (lambda (a)
(or (num-utils:safe-parse-number a)
1/3))
:configuration-tree *client-configuration*)
swconf:+key-gemini+
+key-image+
+key-inline+
+key-relative+
+key-scaling+)

View File

@ -434,7 +434,8 @@
(gemtext-widget-width (gemtext-widget-pixel-width main-window)) (gemtext-widget-width (gemtext-widget-pixel-width main-window))
(pixmap-w (nodgui.pixmap:width pixmap)) (pixmap-w (nodgui.pixmap:width pixmap))
(ratio (/ 1 (/ pixmap-w (ratio (/ 1 (/ pixmap-w
(* gemtext-widget-width 1/3))))) (* gemtext-widget-width
(client-configuration:config-inline-scaling-ratio))))))
(if (< ratio 1.0) (if (< ratio 1.0)
(nodgui.pixmap:scale-bilinear pixmap ratio ratio) (nodgui.pixmap:scale-bilinear pixmap ratio ratio)
pixmap))) pixmap)))

View File

@ -3322,6 +3322,7 @@
:config-keybinding-bookmark-show :config-keybinding-bookmark-show
:main-window-select-colors :main-window-select-colors
:emphasize-wrapped-asterisk-p :emphasize-wrapped-asterisk-p
:config-inline-scaling-ratio
:config-stream-frame-show-p)) :config-stream-frame-show-p))
(defpackage :client-os-utils (defpackage :client-os-utils