diff --git a/etc/gui.conf b/etc/gui.conf index ba51e47..56eb794 100644 --- a/etc/gui.conf +++ b/etc/gui.conf @@ -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 diff --git a/src/gui/client/client-configuration.lisp b/src/gui/client/client-configuration.lisp index 12ae738..62108a1 100644 --- a/src/gui/client/client-configuration.lisp +++ b/src/gui/client/client-configuration.lisp @@ -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+)))) diff --git a/src/gui/client/main-window.lisp b/src/gui/client/main-window.lisp index 3d122c6..bd411cb 100644 --- a/src/gui/client/main-window.lisp +++ b/src/gui/client/main-window.lisp @@ -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")))) - (setf gemtext-widget (make-instance 'gui:scrolled-text - :background (gui-conf:gemini-window-colors) - :padx padding-pixel - :master object - :read-only t - :font gemtext-font))) + (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)))) (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)) diff --git a/src/gui/client/search-frame.lisp b/src/gui/client/search-frame.lisp index f975450..65ef543 100644 --- a/src/gui/client/search-frame.lisp +++ b/src/gui/client/search-frame.lisp @@ -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)) diff --git a/src/package.lisp b/src/package.lisp index cac2563..05b92de 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -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