diff options
author | Carlos Soriano <csoriano@gnome.org> | 2016-03-03 18:05:40 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-03-03 18:07:53 +0100 |
commit | a9af5c60ad4b55d0808b06e61ed26ddb15dcf09f (patch) | |
tree | 4e0a0258f3ad576f1b4d942003cee4d1ebfdde05 /src | |
parent | 4b2753d33a402762f6607f4c1b8626679c77a4bf (diff) | |
download | nautilus-a9af5c60ad4b55d0808b06e61ed26ddb15dcf09f.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/nautilus-window-slot.c | 3 | ||||
-rw-r--r-- | src/resources/css/Adwaita.css | 5 |
2 files changed, 8 insertions, 0 deletions
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; } |