From 453a3c64065045b0e6091e84cedec73ef799dffd Mon Sep 17 00:00:00 2001 From: takotori Date: Thu, 2 Nov 2023 17:17:47 +0100 Subject: [PATCH] fix crash when clicking on separator --- src/components/window/window.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/window/window.rs b/src/components/window/window.rs index 85618fe..4779d3c 100644 --- a/src/components/window/window.rs +++ b/src/components/window/window.rs @@ -2,7 +2,7 @@ use adw::BreakpointCondition; use adw::glib::clone; use adw::subclass::prelude::ObjectSubclassIsExt; use glib::Object; -use gtk::{Application, gio, glib, Orientation}; +use gtk::{Application, gio, glib, ListBoxRow, Orientation}; use gtk::prelude::*; use crate::components::window::handleSidebarClick::*; @@ -208,7 +208,10 @@ impl Window { for subEntry in subEntries { selfImp.resetSidebarList.append(subEntry); } - selfImp.resetSidebarList.append(>k::Separator::new(Orientation::Horizontal)) + let separator = ListBoxRow::new(); + separator.set_child(Some(>k::Separator::new(Orientation::Horizontal))); + separator.set_activatable(false); + selfImp.resetSidebarList.append(&separator); } }