summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2019-08-05 22:31:21 +0100
committerOndrej Holy <oholy@redhat.com>2020-03-26 08:08:02 +0000
commit7e6faccfd4c7e129b4a25bab64342aa8061b2b36 (patch)
tree1e06363d149c9f54fe9532bfce32fe2a3c8f83a7 /src
parent4c447656e5236f780b23b948fd6b12175a35d5d9 (diff)
downloadnautilus-7e6faccfd4c7e129b4a25bab64342aa8061b2b36.tar.gz
toolbar: Always show pathbar background907-graphical-issues-with-updated-path-bar
We hide the pathbar background when the window so small that the pathbar is no longer centered. This was introduced to make the pathbar flat. However, now that the pathbar is buttonized again, it doesn't make it flat, so there is no point. The transformation is only a distraction. Furthermore, it is prone to styling glitches. So, give up on the transformation and always have a pathbar background, effectively reverting commit 080400bd243ab86d82954eaff0c866c3ac97f3f2 Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/907
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-toolbar.c29
-rw-r--r--src/resources/css/Adwaita.css30
-rw-r--r--src/resources/ui/nautilus-toolbar.ui1
3 files changed, 14 insertions, 46 deletions
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index d14f17867..4ecb5ff6a 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -849,31 +849,6 @@ undo_manager_changed (NautilusToolbar *self)
}
static void
-on_notify_width_maximized (NautilusContainerMaxWidth *container,
- GParamSpec *pspec,
- gpointer user_data)
-{
- NautilusToolbar *self;
- GtkStyleContext *context;
- gboolean width_maximized;
-
- self = NAUTILUS_TOOLBAR (user_data);
- context = gtk_widget_get_style_context (self->path_bar_container);
- width_maximized = nautilus_container_max_width_get_width_maximized (container);
-
- g_return_if_fail (gtk_style_context_has_class (context, "width-maximized") != width_maximized);
-
- if (width_maximized)
- {
- gtk_style_context_add_class (context, "width-maximized");
- }
- else
- {
- gtk_style_context_remove_class (context, "width-maximized");
- }
-}
-
-static void
on_location_entry_close (GtkWidget *close_button,
NautilusToolbar *self)
{
@@ -936,10 +911,6 @@ nautilus_toolbar_constructed (GObject *object)
self->path_bar = g_object_new (NAUTILUS_TYPE_PATH_BAR, NULL);
gtk_container_add (GTK_CONTAINER (self->path_bar_container),
self->path_bar);
- g_signal_connect (self->toolbar_switcher_container_max_width,
- "notify::width-maximized",
- G_CALLBACK (on_notify_width_maximized),
- self);
self->location_entry = nautilus_location_entry_new ();
gtk_container_add (GTK_CONTAINER (self->location_entry_container),
diff --git a/src/resources/css/Adwaita.css b/src/resources/css/Adwaita.css
index 666650975..546d3e98a 100644
--- a/src/resources/css/Adwaita.css
+++ b/src/resources/css/Adwaita.css
@@ -45,33 +45,29 @@
/* Path bar */
-.nautilus-path-bar button { /* undecorate the buttons */
- margin: 0px;
-}
-
-.nautilus-path-bar button:not(:checked) image { opacity: 0.8; } /* dim the icon when not checked */
-
.path-bar-box {
- transition: border 200ms;
- transition: background-color 200ms;
border-radius: 5px;
-}
-
-.path-bar-box.width-maximized {
border: 1px @borders solid;
background-color: @theme_bg_color;
+ padding-right: 6px;
+}
+
+.nautilus-path-bar button {
+ margin: 0px;
}
-.path-bar-box.width-maximized button:first-child {
- border-radius: 3.5px 0px 0px 3.5px;
- border-width: 0px 1px 0px 0px;
+.nautilus-path-bar button:first-child {
+ border-width: 0px 1px 0px 0px;
+ border-radius: 3.5px 0px 0px 3.5px;
}
-.path-bar-box.width-maximized button:not(:first-child) {
- border-width: 0px 1px 0px 1px;
- border-radius: 0px 0px 0px 0px;
+.nautilus-path-bar button:not(:first-child) {
+ border-width: 0px 1px 0px 1px;
+ border-radius: 0px 0px 0px 0px;
}
+.nautilus-path-bar button:not(:checked) image { opacity: 0.8; } /* dim the icon when not checked */
+
/* Make the tags fit into the box */
entry.search > * {
margin: 5px;
diff --git a/src/resources/ui/nautilus-toolbar.ui b/src/resources/ui/nautilus-toolbar.ui
index 0e8ebaf2c..51a882838 100644
--- a/src/resources/ui/nautilus-toolbar.ui
+++ b/src/resources/ui/nautilus-toolbar.ui
@@ -602,6 +602,7 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="margin_start">72</property>
<child>
<object class="GtkRevealer" id="operations_revealer">
<property name="visible">True</property>