[nautilus] pathbar: always show the sliders
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] pathbar: always show the sliders
- Date: Mon, 14 Mar 2016 22:33:58 +0000 (UTC)
commit 6f6bfdeaf91dce7f4708aa575bc7f5b05b3fd85b
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 53fe7ed..06306f7 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;
}
@@ -597,7 +597,7 @@ nautilus_path_bar_size_allocate (GtkWidget *widget,
gint down_slider_offset;
GtkRequisition child_requisition;
- need_sliders = FALSE;
+ need_sliders = TRUE;
up_slider_offset = 0;
down_slider_offset = 0;
path_bar = NAUTILUS_PATH_BAR (widget);
@@ -630,7 +630,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]