mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
update margins
This commit is contained in:
parent
41f27e654b
commit
39493d5ced
4 changed files with 17 additions and 22 deletions
|
|
@ -34,7 +34,6 @@ impl File for Box {
|
|||
const MARGIN: i32 = 8;
|
||||
|
||||
let g_box = Box::builder()
|
||||
.margin_bottom(MARGIN)
|
||||
.margin_end(MARGIN)
|
||||
.margin_start(MARGIN)
|
||||
.orientation(Orientation::Vertical)
|
||||
|
|
|
|||
|
|
@ -8,12 +8,9 @@ impl Form for Button {
|
|||
fn form() -> Self {
|
||||
use gtk::prelude::{ButtonExt, WidgetExt};
|
||||
|
||||
const MARGIN: i32 = 8;
|
||||
|
||||
let button = Button::builder()
|
||||
.label("Choose a file..")
|
||||
.margin_bottom(MARGIN)
|
||||
.margin_top(MARGIN)
|
||||
.margin_top(4)
|
||||
.build();
|
||||
|
||||
button.connect_clicked(|this| {
|
||||
|
|
|
|||
|
|
@ -29,14 +29,12 @@ impl Text for gtk::Box {
|
|||
// Init widget
|
||||
let g_box = {
|
||||
const MARGIN: i32 = 8;
|
||||
const SPACING: i32 = 8;
|
||||
|
||||
let g_box = gtk::Box::builder()
|
||||
.margin_bottom(MARGIN)
|
||||
.margin_bottom(MARGIN / 2)
|
||||
.margin_end(MARGIN)
|
||||
.margin_start(MARGIN)
|
||||
.orientation(Orientation::Vertical)
|
||||
.spacing(SPACING)
|
||||
.spacing(MARGIN)
|
||||
.build();
|
||||
|
||||
g_box.append(&form);
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ use gtk::{
|
|||
use libspelling::{Checker, TextBufferAdapter};
|
||||
use sourceview::Buffer;
|
||||
|
||||
const MARGIN: i32 = 8;
|
||||
|
||||
pub trait Form {
|
||||
fn form() -> Self;
|
||||
fn text(&self) -> GString;
|
||||
|
|
@ -27,17 +25,20 @@ impl Form for TextView {
|
|||
adapter.set_enabled(true);
|
||||
|
||||
// Init main widget
|
||||
let text_view = TextView::builder()
|
||||
.bottom_margin(MARGIN)
|
||||
.buffer(&buffer)
|
||||
.css_classes(["frame", "view"])
|
||||
.extra_menu(&adapter.menu_model())
|
||||
.left_margin(MARGIN)
|
||||
.margin_bottom(MARGIN / 2)
|
||||
.right_margin(MARGIN)
|
||||
.top_margin(MARGIN)
|
||||
.wrap_mode(WrapMode::Word)
|
||||
.build();
|
||||
|
||||
let text_view = {
|
||||
const MARGIN: i32 = 8;
|
||||
TextView::builder()
|
||||
.bottom_margin(MARGIN)
|
||||
.buffer(&buffer)
|
||||
.css_classes(["frame", "view"])
|
||||
.extra_menu(&adapter.menu_model())
|
||||
.left_margin(MARGIN)
|
||||
.right_margin(MARGIN)
|
||||
.top_margin(MARGIN)
|
||||
.wrap_mode(WrapMode::Word)
|
||||
.build()
|
||||
};
|
||||
|
||||
text_view.insert_action_group("spelling", Some(&adapter));
|
||||
text_view.set_size_request(-1, 38); // @TODO [#635](https://gitlab.gnome.org/GNOME/pygobject/-/issues/635)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue