summarylogtreecommitdiffstats
path: root/appearance__file-chooser.patch
blob: cbf0fbf1ff1516b423a9804260a88b6b2128221e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff --color -U 5 -r -Z -B ./org/gtk/gtkfilechooserwidget.c ./mod/gtk/gtkfilechooserwidget.c
--- ./org/gtk/gtkfilechooserwidget.c	2018-03-12 20:20:04.000000000 +0100
+++ ./mod/gtk/gtkfilechooserwidget.c	2018-03-13 20:34:44.629974675 +0100
@@ -75,10 +75,11 @@
 #include "gtkrevealer.h"
 #include "gtkspinner.h"
 #include "gtkseparator.h"
 #include "gtkmodelbutton.h"
 #include "gtkgesturelongpress.h"
+#include "gtkcssprovider.h"
 
 #include <cairo-gobject.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -8545,10 +8546,20 @@
   gtk_popover_set_default_widget (GTK_POPOVER (impl->priv->new_folder_popover), impl->priv->new_folder_create_button);
   gtk_popover_set_default_widget (GTK_POPOVER (impl->priv->rename_file_popover), impl->priv->rename_file_rename_button);
   gtk_popover_set_relative_to (GTK_POPOVER (impl->priv->rename_file_popover), impl->priv->browse_files_tree_view);
 
   add_actions (impl);
+  static gboolean style_added = FALSE;
+  if (!style_added)
+    {
+      style_added = TRUE;
+      GtkCssProvider *provider = gtk_css_provider_new ();
+      gtk_css_provider_load_from_data (provider,
+        "filechooser .sidebar-icon, filechooser .path-bar, filechooser .path-bar + button { opacity: 1; -gtk-icon-style: regular; }", -1, NULL);
+      gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (GTK_WIDGET (impl)),
+        GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+    }
 }
 
 void
 gtk_file_chooser_widget_set_save_entry (GtkFileChooserWidget *impl,
                                         GtkWidget            *entry)