[gimp/gtk3-port] app, themes: move GimpDisplayShell styling to CSS



commit c2d7af5896b7acdf68c1bdf6e14320856e257ffc
Author: Michael Natterer <mitch gimp org>
Date:   Wed May 2 12:57:13 2018 +0200

    app, themes: move GimpDisplayShell styling to CSS
    
    Looks half-decent again now.

 app/display/gimpdisplayshell.c |   18 ++----------------
 themes/System/gimp.css         |    6 ++++++
 2 files changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index 11fef61..64f7cd6 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -280,6 +280,8 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
                                    g_param_spec_object ("icon", NULL, NULL,
                                                         GDK_TYPE_PIXBUF,
                                                         GIMP_PARAM_READWRITE));
+
+  gtk_widget_class_set_css_name (widget_class, "GimpDisplayShell");
 }
 
 static void
@@ -293,22 +295,6 @@ gimp_color_managed_iface_init (GimpColorManagedInterface *iface)
 static void
 gimp_display_shell_init (GimpDisplayShell *shell)
 {
-  GtkCssProvider *css;
-  const gchar    *str;
-
-  str =
-    "GimpDisplayShell GtkCheckButton {\n"
-    "    -GtkButton-child-displacement-x: 0;\n"
-    "    -GtkButton-child-displacement-y: 0;\n"
-    "}\n";
-
-  css = gtk_css_provider_new ();
-  gtk_css_provider_load_from_data (css, str, -1, NULL);
-  gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (shell)),
-                                  GTK_STYLE_PROVIDER (css),
-                                  GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
-  g_object_unref (css);
-
   shell->options            = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS, NULL);
   shell->fullscreen_options = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_FULLSCREEN, NULL);
   shell->no_image_options   = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_NO_IMAGE, NULL);
diff --git a/themes/System/gimp.css b/themes/System/gimp.css
index f7b7b87..05c2003 100644
--- a/themes/System/gimp.css
+++ b/themes/System/gimp.css
@@ -56,6 +56,12 @@ GimpColorScales spinbutton entry {
     min-height: 0;
 }
 
+GimpDisplayShell button {
+    min-height: 0;
+    min-width: 0;
+    padding: 0 0 0 0;
+}
+
 GimpDock {
     font-size: smaller;
 }


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