feat: Add standard page home

This commit is contained in:
dashie 2023-12-11 11:53:49 +00:00
parent b6b3ebfd64
commit 3b94bd76f3
3 changed files with 22 additions and 6 deletions

View file

@ -23,7 +23,14 @@ unsafe impl Sync for ReSetWindow {}
impl ReSetWindow { impl ReSetWindow {
pub fn new(app: &Application) -> Self { 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) { pub fn setup_callback(&self) {
@ -234,11 +241,16 @@ impl ReSetWindow {
for sub_entry in sub_entries { for sub_entry in sub_entries {
self_imp.reset_sidebar_list.append(sub_entry); self_imp.reset_sidebar_list.append(sub_entry);
} }
let separator = ListBoxRow::new(); let separator = gtk::Separator::builder()
separator.set_child(Some(&gtk::Separator::new(Orientation::Horizontal))); .margin_bottom(3)
separator.set_selectable(false); .margin_top(3)
separator.set_activatable(false); .orientation(Orientation::Horizontal)
self_imp.reset_sidebar_list.append(&separator); .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);
} }
} }

View file

@ -19,5 +19,7 @@
</object> </object>
</property> </property>
<property name="css-classes">resetSidebarEntry</property> <property name="css-classes">resetSidebarEntry</property>
<property name="margin-bottom">2</property>
<property name="margin-top">2</property>
</template> </template>
</interface> </interface>

View file

@ -426,6 +426,8 @@
(5,22,"GtkWidget","margin-end","10",None,None,None,None,None,None,None,None,None), (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,"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","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-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-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), (6,2,"GtkWidget","margin-top","10",None,None,None,None,None,None,None,None,None),