summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2018-09-27 12:50:44 +0100
committerCarlos Soriano <csoriano1618@gmail.com>2018-10-02 13:25:07 +0000
commit0009d0e771f1a7cb9adf12e78d66aefcccc766b6 (patch)
tree4b812155f2cb688668f36c2fa64d13ddefc1b450
parentdae54e0c72e92a3129c4e8754bd9f3025e487c72 (diff)
downloadnautilus-0009d0e771f1a7cb9adf12e78d66aefcccc766b6.tar.gz
toolbar: Use GTK_STYLE_CLASS'es on the pathbar container box
On wider windows, we show a border around the pathbar and fill it with background color using custom CSS specific for Adwaita. This means the pathbar is unbounded in HighContrast mode or 3rd party custom themes, giving the headerbar an uncentered, unbalanced layout. Fix that using the "frame" and "background" style class which are exposed by Gtk+ for this purpose. Closes: https://gitlab.gnome.org/GNOME/nautilus/issues/661
-rw-r--r--src/nautilus-toolbar.c8
-rw-r--r--src/resources/css/Adwaita.css6
2 files changed, 5 insertions, 9 deletions
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index fb0d2d4c0..12fc27a59 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -858,15 +858,17 @@ on_notify_width_maximized (NautilusContainerMaxWidth *container,
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);
+ g_return_if_fail (gtk_style_context_has_class (context, GTK_STYLE_CLASS_FRAME) != width_maximized);
if (width_maximized)
{
- gtk_style_context_add_class (context, "width-maximized");
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME);
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_BACKGROUND);
}
else
{
- gtk_style_context_remove_class (context, "width-maximized");
+ gtk_style_context_remove_class (context, GTK_STYLE_CLASS_FRAME);
+ gtk_style_context_remove_class (context, GTK_STYLE_CLASS_BACKGROUND);
}
}
diff --git a/src/resources/css/Adwaita.css b/src/resources/css/Adwaita.css
index b1e510903..ca7a3a9d4 100644
--- a/src/resources/css/Adwaita.css
+++ b/src/resources/css/Adwaita.css
@@ -65,14 +65,8 @@
.path-bar-box {
transition: border 200ms;
transition: background-color 200ms;
-}
-.path-bar-box.width-maximized {
- border: 1px @borders solid;
border-radius: 3px;
}
-.path-bar-box.width-maximized:not(:backdrop) {
- background-color: @theme_bg_color;
-}
/* Make the tags fit into the box */
entry.search > * {