draft reader widget

This commit is contained in:
yggverse 2024-09-25 18:38:55 +03:00
parent 9c480d3a64
commit bc03801925
2 changed files with 31 additions and 0 deletions

View File

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

View File

@ -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
}
}