mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-09-13 23:41:53 +00:00
use common const
This commit is contained in:
parent
9b3fad7e76
commit
1ffc5c1edb
@ -1,6 +1,9 @@
|
|||||||
use gtk::{prelude::BoxExt, Box, Button, Entry, Orientation};
|
use gtk::{prelude::BoxExt, Box, Button, Entry, Orientation};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
const MARGIN: i32 = 6;
|
||||||
|
const SPACING: i32 = 6;
|
||||||
|
|
||||||
pub struct Widget {
|
pub struct Widget {
|
||||||
gobject: Box,
|
gobject: Box,
|
||||||
}
|
}
|
||||||
@ -16,10 +19,10 @@ impl Widget {
|
|||||||
) -> Arc<Self> {
|
) -> Arc<Self> {
|
||||||
let gobject = Box::builder()
|
let gobject = Box::builder()
|
||||||
.orientation(Orientation::Horizontal)
|
.orientation(Orientation::Horizontal)
|
||||||
.spacing(8)
|
.spacing(SPACING)
|
||||||
.margin_start(6)
|
.margin_start(MARGIN)
|
||||||
.margin_end(6)
|
.margin_end(MARGIN)
|
||||||
.margin_bottom(6)
|
.margin_bottom(MARGIN)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
gobject.append(base);
|
gobject.append(base);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user