From 09cd5895cc569f6738a7fc2045942b8b8e188b93 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 27 Sep 2024 23:30:22 +0300 Subject: [PATCH] apply tmp solution --- .../main/tab/page/content/text/gemini/reader.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/browser/main/tab/page/content/text/gemini/reader.rs b/src/browser/main/tab/page/content/text/gemini/reader.rs index 5787984c..3392e266 100644 --- a/src/browser/main/tab/page/content/text/gemini/reader.rs +++ b/src/browser/main/tab/page/content/text/gemini/reader.rs @@ -12,7 +12,7 @@ use gtk::{ pub struct Reader { title: Option, - // css: CssProvider, @TODO + css: CssProvider, widget: Label, } @@ -52,13 +52,15 @@ impl Reader { } // Init CSS - /* @TODO Theme parser error: let css = CssProvider::new(); + /* @TODO Theme parser error: css.load_from_path( "src/browser/main/tab/page/content/text/gemini/reader/default.css", // @TODO ); */ + css.load_from_data("label{caret-color: transparent}"); + // Init widget let widget = Label::builder() .halign(Align::Fill) @@ -75,10 +77,9 @@ impl Reader { .label(markup) .build(); - /* @TODO widget .style_context() - .add_provider(&css, STYLE_PROVIDER_PRIORITY_APPLICATION); */ + .add_provider(&css, STYLE_PROVIDER_PRIORITY_APPLICATION); // Connect actions widget.connect_activate_link(|label, href| { @@ -104,11 +105,7 @@ impl Reader { }); // Result - Self { - title, - // css, @TODO - widget, - } + Self { title, css, widget } } // Getters