mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 08:35:28 +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 {
|
||||
fn plain(data: &str) -> Self;
|
||||
|
|
@ -10,13 +10,14 @@ impl Plain for TextView {
|
|||
TextView::builder()
|
||||
.bottom_margin(MARGIN)
|
||||
.cursor_visible(false)
|
||||
.buffer(&TextBuffer::builder().text(data).build())
|
||||
.buffer(>k::TextBuffer::builder().text(data).build())
|
||||
.editable(false)
|
||||
.left_margin(MARGIN)
|
||||
.monospace(true)
|
||||
.right_margin(MARGIN)
|
||||
.top_margin(MARGIN)
|
||||
.vexpand(true)
|
||||
.wrap_mode(gtk::WrapMode::Word)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue