summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/caja-pathbar.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c
index 39903f6e..ca8807b1 100644
--- a/src/caja-pathbar.c
+++ b/src/caja-pathbar.c
@@ -560,6 +560,7 @@ caja_path_bar_get_preferred_width (GtkWidget *widget,
gint child_height;
gint height;
gint child_min, child_nat;
+ gint slider_width;
path_bar = CAJA_PATH_BAR (widget);
@@ -586,12 +587,20 @@ caja_path_bar_get_preferred_width (GtkWidget *widget,
/* Theoretically, the slider could be bigger than the other button. But we're
* not going to worry about that now.
*/
- path_bar->slider_width = MIN (height * 2 / 3 + 5, height);
+ gtk_widget_get_preferred_width (path_bar->down_slider_button,
+ &slider_width,
+ NULL);
+ gtk_widget_get_preferred_width (path_bar->up_slider_button,
+ &slider_width,
+ NULL);
+
if (path_bar->button_list) {
- *minimum += (path_bar->spacing + path_bar->slider_width) * 2;
- *natural += (path_bar->spacing + path_bar->slider_width) * 2;
+ *minimum += (path_bar->spacing + slider_width) * 2;
+ *natural += (path_bar->spacing + slider_width) * 2;
}
+ /*Let's keep the rest of this as it was */
+ path_bar->slider_width = slider_width;
}
static void