Browse Source

apply tmp solution

master
yggverse 2 months ago
parent
commit
09cd5895cc
  1. 15
      src/browser/main/tab/page/content/text/gemini/reader.rs

15
src/browser/main/tab/page/content/text/gemini/reader.rs

@ -12,7 +12,7 @@ use gtk::{
pub struct Reader { pub struct Reader {
title: Option<GString>, title: Option<GString>,
// css: CssProvider, @TODO css: CssProvider,
widget: Label, widget: Label,
} }
@ -52,13 +52,15 @@ impl Reader {
} }
// Init CSS // Init CSS
/* @TODO Theme parser error: <broken file>
let css = CssProvider::new(); let css = CssProvider::new();
/* @TODO Theme parser error: <broken file>
css.load_from_path( css.load_from_path(
"src/browser/main/tab/page/content/text/gemini/reader/default.css", // @TODO "src/browser/main/tab/page/content/text/gemini/reader/default.css", // @TODO
); */ ); */
css.load_from_data("label{caret-color: transparent}");
// Init widget // Init widget
let widget = Label::builder() let widget = Label::builder()
.halign(Align::Fill) .halign(Align::Fill)
@ -75,10 +77,9 @@ impl Reader {
.label(markup) .label(markup)
.build(); .build();
/* @TODO
widget widget
.style_context() .style_context()
.add_provider(&css, STYLE_PROVIDER_PRIORITY_APPLICATION); */ .add_provider(&css, STYLE_PROVIDER_PRIORITY_APPLICATION);
// Connect actions // Connect actions
widget.connect_activate_link(|label, href| { widget.connect_activate_link(|label, href| {
@ -104,11 +105,7 @@ impl Reader {
}); });
// Result // Result
Self { Self { title, css, widget }
title,
// css, @TODO
widget,
}
} }
// Getters // Getters

Loading…
Cancel
Save