mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
use WrapMode::Word for text/plain
This commit is contained in:
parent
c58936d336
commit
1aae5a0f28
1 changed files with 3 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
use gtk::{TextBuffer, TextView};
|
use gtk::TextView;
|
||||||
|
|
||||||
pub trait Plain {
|
pub trait Plain {
|
||||||
fn plain(data: &str) -> Self;
|
fn plain(data: &str) -> Self;
|
||||||
|
|
@ -10,13 +10,14 @@ impl Plain for TextView {
|
||||||
TextView::builder()
|
TextView::builder()
|
||||||
.bottom_margin(MARGIN)
|
.bottom_margin(MARGIN)
|
||||||
.cursor_visible(false)
|
.cursor_visible(false)
|
||||||
.buffer(&TextBuffer::builder().text(data).build())
|
.buffer(>k::TextBuffer::builder().text(data).build())
|
||||||
.editable(false)
|
.editable(false)
|
||||||
.left_margin(MARGIN)
|
.left_margin(MARGIN)
|
||||||
.monospace(true)
|
.monospace(true)
|
||||||
.right_margin(MARGIN)
|
.right_margin(MARGIN)
|
||||||
.top_margin(MARGIN)
|
.top_margin(MARGIN)
|
||||||
.vexpand(true)
|
.vexpand(true)
|
||||||
|
.wrap_mode(gtk::WrapMode::Word)
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue