Browse Source

draft reader widget

master
yggverse 2 months ago
parent
commit
bc03801925
  1. 4
      src/browser/main/tab/page/content/text/gemini/reader/default.css
  2. 27
      src/browser/main/tab/page/content/text/gemini/reader/mod.rs

4
src/browser/main/tab/page/content/text/gemini/reader/default.css

@ -0,0 +1,4 @@
label
{
caret-color: transparent;
}

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

@ -0,0 +1,27 @@
use gtk::{Align, Label};
pub struct Reader {
widget: Label,
}
impl Reader {
// Construct
pub fn new() -> Reader {
Self {
widget: Label::builder()
.halign(Align::Start)
.valign(Align::Start)
.margin_start(8)
.margin_end(8)
.wrap(true)
.selectable(true)
.use_markup(true)
.build(),
}
}
// Getters
pub fn widget(&self) -> &Label {
&self.widget
}
}
Loading…
Cancel
Save