[goffice] GO3DRotationSel: use css.



commit dab1caf0776240ec13cff3a18dd8e47add9296aa
Author: Morten Welinder <terra gnome org>
Date:   Sat Dec 2 19:45:14 2017 -0500

    GO3DRotationSel: use css.

 ChangeLog                        |    1 +
 goffice/gtk/go-3d-rotation-sel.c |    7 +++----
 goffice/gtk/goffice.css          |    7 ++++++-
 3 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c5d7b65..f3eb887 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * goffice/gtk/go-rotation-sel.c (cb_rotate_canvas_realize): Use
        css for styling.
+       * goffice/gtk/go-3d-rotation-sel.c (cb_rotate_canvas_realize): Ditto.
 
 2017-12-01  Morten Welinder <terra gnome org>
 
diff --git a/goffice/gtk/go-3d-rotation-sel.c b/goffice/gtk/go-3d-rotation-sel.c
index cf5b44b..8819290 100644
--- a/goffice/gtk/go-3d-rotation-sel.c
+++ b/goffice/gtk/go-3d-rotation-sel.c
@@ -192,10 +192,6 @@ cb_rotate_canvas_realize (GocCanvas *canvas, GO3DRotationSel *g3d)
        int i;
        GOStyle *go_style;
        double mgn = g3d->margin - 2 + g3d->radius;
-       GdkRGBA color = {1., 1., 1., 1.};
-
-       gtk_widget_override_background_color (GTK_WIDGET (canvas),
-                                             GTK_STATE_FLAG_NORMAL, &color);
 
        for (i = 0; i < 6; ++i) {
                g3d->cube_polygons[i] = goc_item_new (group,
@@ -366,6 +362,9 @@ g3d_init (GO3DRotationSel *g3d)
                          NULL);
        w = go_gtk_builder_get_widget (g3d->gui, "toplevel");
        gtk_box_pack_start (GTK_BOX (g3d), w, TRUE, TRUE, 0);
+
+       _go_gtk_widget_add_css_provider (GTK_WIDGET (g3d->rotate_canvas));
+
        gtk_widget_show_all (GTK_WIDGET (g3d));
 }
 
diff --git a/goffice/gtk/goffice.css b/goffice/gtk/goffice.css
index c54011d..f5be9b2 100644
--- a/goffice/gtk/goffice.css
+++ b/goffice/gtk/goffice.css
@@ -9,5 +9,10 @@
 
 GORotationSel GocCanvas {
   background-image: none;
-  background-color: blue;
+  background-color: white;
+}
+
+GO3DRotationSel GocCanvas {
+  background-image: none;
+  background-color: white;
 }


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