From 1eb4bb20758b05eb8217f3359ba15da413ed7f7e Mon Sep 17 00:00:00 2001 From: yggverse Date: Thu, 17 Oct 2024 05:26:45 +0300 Subject: [PATCH] fix margins --- .../tab/item/page/input/response/form/widget.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/browser/window/tab/item/page/input/response/form/widget.rs b/src/app/browser/window/tab/item/page/input/response/form/widget.rs index 4f4c116f..5791fe70 100644 --- a/src/app/browser/window/tab/item/page/input/response/form/widget.rs +++ b/src/app/browser/window/tab/item/page/input/response/form/widget.rs @@ -1,8 +1,13 @@ 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; +const MARGIN: i32 = 8; + pub struct Widget { gobject: TextView, } @@ -12,10 +17,10 @@ impl Widget { pub fn new_arc(action_update: Arc) -> Arc { // Init gobject let gobject = TextView::builder() - .left_margin(8) - .pixels_above_lines(8) - .pixels_below_lines(8) - .right_margin(8) + .bottom_margin(MARGIN) + .left_margin(MARGIN) + .right_margin(MARGIN) + .top_margin(MARGIN) .wrap_mode(WrapMode::Word) .build();