From 0c091b299f2ca8ee74d9ebff1760ddd2dc46cfdc Mon Sep 17 00:00:00 2001 From: cage Date: Sun, 11 Jun 2023 13:54:41 +0200 Subject: [PATCH] - [GUI] fixed highlighting of the selected text. --- etc/gui.conf | 4 ++-- src/gui/client/main-window.lisp | 37 +++++++++++++++++---------------- tinmop.asd | 2 +- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/etc/gui.conf b/etc/gui.conf index 2a0ce1f..9aaad03 100644 --- a/etc/gui.conf +++ b/etc/gui.conf @@ -6,9 +6,9 @@ gemini.favicon = "🌍" -gemini.main-window.select.background = #ff00ff +gemini.main-window.select.background = #f2d8f4 -gemini.main-window.select.foreground = #ffffff +gemini.main-window.select.foreground = #5b4636 gemini.main-window.foreground = #5b4636 diff --git a/src/gui/client/main-window.lisp b/src/gui/client/main-window.lisp index 443fdc1..6949a48 100644 --- a/src/gui/client/main-window.lisp +++ b/src/gui/client/main-window.lisp @@ -636,23 +636,24 @@ (new-text-line-start `(:line ,line-number :char 0))) (vector-push-extend link-rendered-label ir-rendered-lines) (gui:append-text gemtext-widget (a:last-elt ir-rendered-lines)) - (gui:make-link-button gemtext-widget - new-text-line-start - `(- :end 1 :chars) - link-font - link-fg - link-bg - (link-click-mouse-1-callback-clsr target-iri - main-window) - :button-3-callback - (contextual-menu-link-clrs link-name - target-iri - main-window) - :over-callback - (lambda () (print-info-message target-iri)) - :leave-callback - (lambda () (print-info-message ""))) - (gui:append-line gemtext-widget "")))))) + (let ((tag-link (gui:make-link-button gemtext-widget + new-text-line-start + `(- :end 1 :chars) + link-font + link-fg + link-bg + (link-click-mouse-1-callback-clsr target-iri + main-window) + :button-3-callback + (contextual-menu-link-clrs link-name + target-iri + main-window) + :over-callback + (lambda () (print-info-message target-iri)) + :leave-callback + (lambda () (print-info-message ""))))) + (gui:tag-lower gemtext-widget tag-link) + (gui:append-line gemtext-widget ""))))))) (render-line (key text line-number &key (wrap :word)) (let ((font (key->font key)) (justification (key->justification key)) @@ -674,7 +675,7 @@ :justify justification) ;; does not works because of a TK bug ;;(colorize-emoji main-window (1- line-number)) - tag))))) + (gui:tag-lower gemtext-widget tag)))))) (loop with render-line-count = 0 with starting-pre-block-line = -1 with ending-pre-block-line = -1 diff --git a/tinmop.asd b/tinmop.asd index 26355c1..08219ea 100644 --- a/tinmop.asd +++ b/tinmop.asd @@ -18,7 +18,7 @@ (defsystem :tinmop :author "cage" :license "GPLv3" - :version "0.9.9.1414" + :version "0.9.9.14142.RC1" :pathname "src" :serial t :bug-tracker "https://notabug.org/cage/tinmop/issues"