aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-07-14 12:45:45 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-07-14 12:47:35 +0200
commitc6096d05b5cf3be90851153240819b422a69f01c (patch)
tree3fd308aa69dcb409282d88e2c7773d6ba0b1cd54
parent07aa11d78d056703c221d7a1d7ce6226bbeca599 (diff)
downloadfiv-c6096d05b5cf3be90851153240819b422a69f01c.tar.gz
fiv-c6096d05b5cf3be90851153240819b422a69f01c.tar.xz
fiv-c6096d05b5cf3be90851153240819b422a69f01c.zip
Discard the inner sidebar's size request
It used to create a hole when there weren't enough bookmarks to fill that space.
-rw-r--r--fiv-sidebar.c7
1 files changed, 6 insertions, 1 deletions
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);