[nautilus/gnome-3-20] pathbar: always show the sliders



commit 710fd4c59b2b74f4579fbb90b0b617f502842e9e
Author: Carlos Soriano <csoriano gnome org>
Date:   Mon Mar 14 23:31:48 2016 +0100

    pathbar: always show the sliders
    
    The style cannot be done in a way that makes the path bar with a
    permanent visual glitch.
    Follow what the file chooser does and always show the sliders to prevent
    that, although we are reclutant to any solution, none of them are good.
    
    Let's make the new path bar for 3.22.

 src/nautilus-pathbar.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 104d97e..c3aa72c 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -480,7 +480,7 @@ nautilus_path_bar_get_preferred_width (GtkWidget *widget,
         */
        path_bar->priv->slider_width = MIN (height * 2 / 3 + 5, height);
 
-       if (path_bar->priv->button_list && path_bar->priv->button_list->next != NULL) {
+       if (path_bar->priv->button_list) {
                *minimum += (path_bar->priv->slider_width) * 2;
                *natural += (path_bar->priv->slider_width) * 2;
        }
@@ -616,7 +616,7 @@ nautilus_path_bar_size_allocate (GtkWidget     *widget,
        GtkRequisition child_requisition;
        gboolean needs_reorder = FALSE;
 
-       need_sliders = FALSE;
+       need_sliders = TRUE;
        up_slider_offset = 0;
        down_slider_offset = 0;
        path_bar = NAUTILUS_PATH_BAR (widget);
@@ -649,7 +649,7 @@ nautilus_path_bar_size_allocate (GtkWidget     *widget,
                 width += child_requisition.width;
         }
 
-        if (width <= allocation->width) {
+        if (width <= allocation->width && !need_sliders) {
                first_button = g_list_last (path_bar->priv->button_list);
         } else {
                 gboolean reached_end;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]