mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-10 20:51:45 +00:00
draft plain text reader widget
This commit is contained in:
parent
bc03801925
commit
f00d652a91
27
src/browser/main/tab/page/content/text/plain/reader/mod.rs
Normal file
27
src/browser/main/tab/page/content/text/plain/reader/mod.rs
Normal 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
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user