[nautilus/revert-0009d0e7] Revert "toolbar: Use GTK_STYLE_CLASS'es on the pathbar container box"
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/revert-0009d0e7] Revert "toolbar: Use GTK_STYLE_CLASS'es on the pathbar container box"
- Date: Wed, 10 Oct 2018 01:26:15 +0000 (UTC)
commit 689882c76bfc5beddd63b3f729e505a708fff9ba
Author: António Fernandes <antoniojpfernandes gmail com>
Date: Wed Oct 10 00:54:08 2018 +0000
Revert "toolbar: Use GTK_STYLE_CLASS'es on the pathbar container box"
This reverts commit e35d708eddb4dd67f53ec6fd83b9de3286564b6a
That commit gave the pathbar a bounding frame under HighContrast.
However, this 1px border is not consistent with button borders, and
it lacks padding. The result is uglier than before the change.
Furthermore, it may be the case that setting GTK_STYLE_CLASS_BACKGROUND
and GTK_STYLE_CLASS_FRAME in a GtkBox is either meaningless or leads to
unexpected styling.
This change is neutral for Adwaita, so let's revert it.
Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/674
src/nautilus-toolbar.c | 8 +++-----
src/resources/css/Adwaita.css | 6 ++++++
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index 12fc27a59..fb0d2d4c0 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -858,17 +858,15 @@ 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, GTK_STYLE_CLASS_FRAME) != width_maximized);
+ g_return_if_fail (gtk_style_context_has_class (context, "width-maximized") != width_maximized);
if (width_maximized)
{
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME);
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_BACKGROUND);
+ gtk_style_context_add_class (context, "width-maximized");
}
else
{
- gtk_style_context_remove_class (context, GTK_STYLE_CLASS_FRAME);
- gtk_style_context_remove_class (context, GTK_STYLE_CLASS_BACKGROUND);
+ gtk_style_context_remove_class (context, "width-maximized");
}
}
diff --git a/src/resources/css/Adwaita.css b/src/resources/css/Adwaita.css
index ca7a3a9d4..b1e510903 100644
--- a/src/resources/css/Adwaita.css
+++ b/src/resources/css/Adwaita.css
@@ -65,8 +65,14 @@
.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 > * {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]