mirror of https://codeberg.org/cage/tinmop/
- [GUI] added configurable text selection color in gemtext window.
This commit is contained in:
parent
32ea984845
commit
5e226644b8
|
@ -6,6 +6,10 @@
|
|||
|
||||
gemini.favicon = "🌍"
|
||||
|
||||
gemini.main-window.select.background = #ff00ff
|
||||
|
||||
gemini.main-window.select.foreground = #ffffff
|
||||
|
||||
gemini.main-window.foreground = #5b4636
|
||||
|
||||
gemini.main-window.background = #f4ecd8
|
||||
|
|
|
@ -43,7 +43,8 @@
|
|||
up
|
||||
bookmark
|
||||
toggle
|
||||
show)
|
||||
show
|
||||
select)
|
||||
|
||||
(defun load-config-file (&optional (virtual-filepath +client-conf-filename+)
|
||||
(perform-missing-value-check nil))
|
||||
|
@ -308,3 +309,15 @@
|
|||
+key-keybinding+
|
||||
+key-bookmark+
|
||||
+key-show+)
|
||||
|
||||
(defun main-window-select-colors ()
|
||||
(values (gui-goodies:parse-color (access:accesses *client-configuration*
|
||||
swconf:+key-gemini+
|
||||
swconf:+key-main-window+
|
||||
+key-select+
|
||||
swconf:+key-background+))
|
||||
(gui-goodies:parse-color (access:accesses *client-configuration*
|
||||
swconf:+key-gemini+
|
||||
swconf:+key-main-window+
|
||||
+key-select+
|
||||
swconf:+key-foreground+))))
|
||||
|
|
|
@ -1190,12 +1190,16 @@
|
|||
(let* ((gemtext-font (gui-conf:gemini-text-font-configuration))
|
||||
(padding (client-configuration:config-gemtext-padding))
|
||||
(padding-pixel (* padding (gui:font-measure gemtext-font "0"))))
|
||||
(multiple-value-bind (select-bg select-fg)
|
||||
(gui-conf:main-window-select-colors)
|
||||
(setf gemtext-widget (make-instance 'gui:scrolled-text
|
||||
:background (gui-conf:gemini-window-colors)
|
||||
:selectbackground select-bg
|
||||
:selectforeground select-fg
|
||||
:padx padding-pixel
|
||||
:master object
|
||||
:read-only t
|
||||
:font gemtext-font)))
|
||||
:font gemtext-font))))
|
||||
(gui:configure gemtext-widget :wrap :word)
|
||||
(setf info-frame (make-instance 'gui:frame :master object :relief :sunken :borderwidth 1))
|
||||
(setf info-text (make-instance 'gui:text :height 2 :wrap :none :master info-frame))
|
||||
|
|
|
@ -37,8 +37,10 @@
|
|||
(loop for match in (matches search-frame) do
|
||||
(gui:tag-configure gemtext-widget
|
||||
(gui:match-tag-name match)
|
||||
:foreground (gui:cget gemtext-widget
|
||||
:selectforeground)
|
||||
:background (gui:cget gemtext-widget
|
||||
:highlightbackground)))))
|
||||
:selectbackground)))))
|
||||
(defun init-window (main-window)
|
||||
(let* ((frame (make-instance 'search-frame :master main-window))
|
||||
(gemtext-widget (client-main-window::gemtext-widget main-window))
|
||||
|
|
|
@ -3293,7 +3293,8 @@
|
|||
:config-keybinding-tour-next
|
||||
:config-gemtext-padding
|
||||
:config-keybinding-bookmark-toggle
|
||||
:config-keybinding-bookmark-show))
|
||||
:config-keybinding-bookmark-show
|
||||
:main-window-select-colors))
|
||||
|
||||
(defpackage :client-os-utils
|
||||
(:use
|
||||
|
|
Loading…
Reference in New Issue