From 3b94bd76f374c087d98767ce8a1e7419b9dc0935 Mon Sep 17 00:00:00 2001 From: dashie Date: Mon, 11 Dec 2023 11:53:49 +0000 Subject: [PATCH] feat: Add standard page home --- src/components/window/reset_window.rs | 24 ++++++++++++++++++------ src/resources/resetSidebarEntry.ui | 2 ++ src/resources/resetUI.cmb | 2 ++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/components/window/reset_window.rs b/src/components/window/reset_window.rs index 96acc80..d1bdd34 100644 --- a/src/components/window/reset_window.rs +++ b/src/components/window/reset_window.rs @@ -23,7 +23,14 @@ unsafe impl Sync for ReSetWindow {} impl ReSetWindow { pub fn new(app: &Application) -> Self { - Object::builder().property("application", app).build() + let obj: Self = Object::builder().property("application", app).build(); + let imp = obj.imp(); + (HANDLE_HOME)( + imp.listeners.clone(), + imp.reset_main.get(), + imp.position.clone(), + ); + obj } pub fn setup_callback(&self) { @@ -234,11 +241,16 @@ impl ReSetWindow { for sub_entry in sub_entries { self_imp.reset_sidebar_list.append(sub_entry); } - let separator = ListBoxRow::new(); - separator.set_child(Some(>k::Separator::new(Orientation::Horizontal))); - separator.set_selectable(false); - separator.set_activatable(false); - self_imp.reset_sidebar_list.append(&separator); + let separator = gtk::Separator::builder() + .margin_bottom(3) + .margin_top(3) + .orientation(Orientation::Horizontal) + .build(); + let separator_row = ListBoxRow::new(); + separator_row.set_child(Some(&separator)); + separator_row.set_selectable(false); + separator_row.set_activatable(false); + self_imp.reset_sidebar_list.append(&separator_row); } } diff --git a/src/resources/resetSidebarEntry.ui b/src/resources/resetSidebarEntry.ui index 0b03aa6..287dcba 100644 --- a/src/resources/resetSidebarEntry.ui +++ b/src/resources/resetSidebarEntry.ui @@ -19,5 +19,7 @@ resetSidebarEntry + 2 + 2 diff --git a/src/resources/resetUI.cmb b/src/resources/resetUI.cmb index e76b16f..b9fadd6 100644 --- a/src/resources/resetUI.cmb +++ b/src/resources/resetUI.cmb @@ -426,6 +426,8 @@ (5,22,"GtkWidget","margin-end","10",None,None,None,None,None,None,None,None,None), (6,1,"GtkListBoxRow","child",None,None,None,None,None,2,None,None,None,None), (6,1,"GtkWidget","css-classes","resetSidebarEntry",None,None,None,None,None,None,None,None,None), + (6,1,"GtkWidget","margin-bottom","2",None,None,None,None,None,None,None,None,None), + (6,1,"GtkWidget","margin-top","2",None,None,None,None,None,None,None,None,None), (6,2,"GtkWidget","margin-bottom","10",None,None,None,None,None,None,None,None,None), (6,2,"GtkWidget","margin-start","10",None,None,None,None,None,None,None,None,None), (6,2,"GtkWidget","margin-top","10",None,None,None,None,None,None,None,None,None),