mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-05 16:04:15 +00:00
fix margins
This commit is contained in:
parent
9f7016d736
commit
1eb4bb2075
@ -1,8 +1,13 @@
|
|||||||
use gtk::{
|
use gtk::{
|
||||||
gio::SimpleAction, glib::GString, prelude::{ActionExt, TextBufferExt, TextViewExt, WidgetExt}, TextView, WrapMode
|
gio::SimpleAction,
|
||||||
|
glib::GString,
|
||||||
|
prelude::{ActionExt, TextBufferExt, TextViewExt, WidgetExt},
|
||||||
|
TextView, WrapMode,
|
||||||
};
|
};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
const MARGIN: i32 = 8;
|
||||||
|
|
||||||
pub struct Widget {
|
pub struct Widget {
|
||||||
gobject: TextView,
|
gobject: TextView,
|
||||||
}
|
}
|
||||||
@ -12,10 +17,10 @@ impl Widget {
|
|||||||
pub fn new_arc(action_update: Arc<SimpleAction>) -> Arc<Self> {
|
pub fn new_arc(action_update: Arc<SimpleAction>) -> Arc<Self> {
|
||||||
// Init gobject
|
// Init gobject
|
||||||
let gobject = TextView::builder()
|
let gobject = TextView::builder()
|
||||||
.left_margin(8)
|
.bottom_margin(MARGIN)
|
||||||
.pixels_above_lines(8)
|
.left_margin(MARGIN)
|
||||||
.pixels_below_lines(8)
|
.right_margin(MARGIN)
|
||||||
.right_margin(8)
|
.top_margin(MARGIN)
|
||||||
.wrap_mode(WrapMode::Word)
|
.wrap_mode(WrapMode::Word)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user