[nautilus/wip/antoniof/experimental-gtk4-build: 25/52] style and css




commit 522e427abc54e3f6681bf31dc0009b2e2ea4c831
Author: António Fernandes <antoniof gnome org>
Date:   Fri Dec 24 00:56:58 2021 +0000

    style and css

 src/nautilus-application.c       | 4 ++--
 src/nautilus-properties-window.c | 8 +++-----
 src/nautilus-toolbar.c           | 2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 57faee94c..fdc9311b3 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -1132,7 +1132,7 @@ theme_changed (GtkSettings *settings)
         {
             provider = gtk_css_provider_new ();
             file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/Adwaita.css");
-            gtk_css_provider_load_from_file (provider, file, NULL);
+            gtk_css_provider_load_from_file (provider, file);
             g_object_unref (file);
         }
 
@@ -1152,7 +1152,7 @@ theme_changed (GtkSettings *settings)
     {
         permanent_provider = gtk_css_provider_new ();
         file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/nautilus.css");
-        gtk_css_provider_load_from_file (permanent_provider, file, NULL);
+        gtk_css_provider_load_from_file (permanent_provider, file);
         /* The behavior of two style providers with the same priority is
          * undefined and gtk happens to prefer the provider that got added last.
          * Use a higher priority here to avoid this problem.
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index bc183c2c5..18a82f8ff 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -2427,7 +2427,6 @@ paint_slice (GtkWidget   *widget,
     double offset = G_PI / 2.0;
     GdkRGBA fill;
     GdkRGBA stroke;
-    GtkStateFlags state;
     GtkBorder border;
     GtkStyleContext *context;
     double x, y, radius;
@@ -2439,14 +2438,13 @@ paint_slice (GtkWidget   *widget,
     }
 
     context = gtk_widget_get_style_context (widget);
-    state = gtk_style_context_get_state (context);
-    gtk_style_context_get_border (context, state, &border);
+    gtk_style_context_get_border (context, &border);
 
     gtk_style_context_save (context);
     gtk_style_context_add_class (context, style_class);
-    gtk_style_context_get_color (context, state, &fill);
+    gtk_style_context_get_color (context, &fill);
     gtk_style_context_add_class (context, "border");
-    gtk_style_context_get_color (context, state, &stroke);
+    gtk_style_context_get_color (context, &stroke);
     gtk_style_context_restore (context);
 
     width = gtk_widget_get_allocated_width (widget);
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index 11198442f..a3e5e9b93 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -588,7 +588,7 @@ on_operations_icon_draw (GtkWidget       *widget,
     GtkStyleContext *style_context;
 
     style_context = gtk_widget_get_style_context (widget);
-    gtk_style_context_get_color (style_context, gtk_style_context_get_state (style_context), &foreground);
+    gtk_style_context_get_color (style_context, &foreground);
     background = foreground;
     background.alpha *= 0.3;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]