From a9af5c60ad4b55d0808b06e61ed26ddb15dcf09f Mon Sep 17 00:00:00 2001 From: Carlos Soriano Date: Thu, 3 Mar 2016 18:05:40 +0100 Subject: window-slot: workaround search bar double border We currently have a double border in the view due to the search bar using a revealer, which always allocates 1 px and therefore shows the bottom border. Since to fix it we would need widgets able to allocate 0 px, which is current impossible, we workaround it with a CSS style that moves the content 1 px upward. --- src/nautilus-window-slot.c | 3 +++ src/resources/css/Adwaita.css | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c index 16e2710c6..54a5e6cfb 100644 --- a/src/nautilus-window-slot.c +++ b/src/nautilus-window-slot.c @@ -631,6 +631,7 @@ nautilus_window_slot_constructed (GObject *object) { NautilusWindowSlot *slot = NAUTILUS_WINDOW_SLOT (object); GtkWidget *extras_vbox; + GtkStyleContext *style_context; G_OBJECT_CLASS (nautilus_window_slot_parent_class)->constructed (object); @@ -639,6 +640,8 @@ nautilus_window_slot_constructed (GObject *object) gtk_widget_show (GTK_WIDGET (slot)); extras_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + style_context = gtk_widget_get_style_context (extras_vbox); + gtk_style_context_add_class (style_context, "searchbar-container"); slot->details->extra_location_widgets = extras_vbox; gtk_box_pack_start (GTK_BOX (slot), extras_vbox, FALSE, FALSE, 0); gtk_widget_show (extras_vbox); diff --git a/src/resources/css/Adwaita.css b/src/resources/css/Adwaita.css index c2ba62d23..8c7967799 100644 --- a/src/resources/css/Adwaita.css +++ b/src/resources/css/Adwaita.css @@ -159,3 +159,8 @@ .documents-entry-tag.button:hover { color: shade(@entry_tag_bg, 2.10); } + +/* Workaround for the double border of the searchbar since we use a revealer which + * always allocates at least 1 pixel */ +searchbar { border-top: 1px solid @borders; } +.searchbar-container { margin-top: -1px; } -- cgit v1.2.1