From 28092a2eca2e841d50a807d106cb16bf26edc7ee Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 13 Oct 2024 20:46:48 +0300 Subject: [PATCH] set accent color for link tags --- .../window/tab/item/page/content/text/gemini/reader.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs b/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs index 94fd61cc..a9523043 100644 --- a/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs +++ b/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs @@ -5,6 +5,7 @@ use parser::header::Header; use parser::link::Link; use widget::Widget; +use adw::StyleManager; use gtk::{ gdk::{BUTTON_MIDDLE, BUTTON_PRIMARY}, gio::SimpleAction, @@ -29,6 +30,9 @@ impl Reader { // Init HashMap storage for event controllers let mut links: HashMap = HashMap::new(); + // Init system palette + let style = StyleManager::default(); + // Init new text buffer let buffer = TextBuffer::new(None); @@ -78,6 +82,7 @@ impl Reader { if let Some(link) = Link::from(line, Some(base), Some(&TimeZone::local())) { // Init new tag for link let tag = TextTag::builder() + .foreground_rgba(&style.accent_color_rgba()) .sentence(true) .wrap_mode(WrapMode::Word) .build();