define margin in components

This commit is contained in:
yggverse 2024-12-15 17:56:29 +02:00
parent ab51b23f7c
commit f0e36e711d
4 changed files with 6 additions and 6 deletions

View File

@ -13,8 +13,6 @@ use gtk::{
};
use std::rc::Rc;
const MARGIN: i32 = 6;
pub struct Find {
pub close: Button,
pub entry: Entry,

View File

@ -1,6 +1,7 @@
use super::MARGIN;
use gtk::{gdk::Cursor, Button};
const MARGIN: i32 = 6;
pub fn new() -> Button {
Button::builder()
.cursor(&Cursor::from_name("default", None).unwrap())

View File

@ -1,9 +1,10 @@
use super::MARGIN;
use gtk::{
prelude::{EditableExt, EntryExt},
Entry, EntryIconPosition,
};
const MARGIN: i32 = 6;
pub fn new() -> Entry {
// Init widget
let entry = Entry::builder()

View File

@ -1,10 +1,10 @@
mod back;
mod forward;
use gtk::{prelude::BoxExt, Box, Button, Orientation, TextIter};
use std::{cell::Cell, rc::Rc};
use super::MARGIN;
use gtk::{prelude::BoxExt, Box, Button, Orientation, TextIter};
const MARGIN: i32 = 6;
pub struct Navigation {
pub back: Button,