mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
apply tmp solution
This commit is contained in:
parent
97d2600ffd
commit
09cd5895cc
1 changed files with 6 additions and 9 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue