From c6096d05b5cf3be90851153240819b422a69f01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Thu, 14 Jul 2022 12:45:45 +0200 Subject: Discard the inner sidebar's size request It used to create a hole when there weren't enough bookmarks to fill that space. --- fiv-sidebar.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'fiv-sidebar.c') diff --git a/fiv-sidebar.c b/fiv-sidebar.c index a27f8a0..3f5cfab 100644 --- a/fiv-sidebar.c +++ b/fiv-sidebar.c @@ -480,7 +480,8 @@ fiv_sidebar_init(FivSidebar *self) // TODO(p): Transplant functionality from the shitty GtkPlacesSidebar. // We cannot reasonably place any new items within its own GtkListBox, // so we need to replicate the style hierarchy to some extent. - self->places = GTK_PLACES_SIDEBAR(gtk_places_sidebar_new()); + GtkWidget *places = gtk_places_sidebar_new(); + self->places = GTK_PLACES_SIDEBAR(places); gtk_places_sidebar_set_show_recent(self->places, FALSE); gtk_places_sidebar_set_show_trash(self->places, FALSE); gtk_places_sidebar_set_open_flags(self->places, @@ -488,6 +489,10 @@ fiv_sidebar_init(FivSidebar *self) g_signal_connect(self->places, "open-location", G_CALLBACK(on_open_location), self); + gint minimum_width = -1; + gtk_widget_get_size_request(places, &minimum_width, NULL); + gtk_widget_set_size_request(places, minimum_width, -1); + gtk_places_sidebar_set_show_enter_location(self->places, TRUE); g_signal_connect(self->places, "show-enter-location", G_CALLBACK(on_show_enter_location), self); -- cgit v1.2.3