[gnumeric] Dead kittens.



commit bba68c1ffeeccd544427c1aeace9fcdd99048cd4
Author: Morten Welinder <terra gnome org>
Date:   Tue Feb 16 18:12:28 2021 -0500

    Dead kittens.
    
    It doesn't look like style regions work anymore, so use style classes.

 NEWS                                |  1 +
 src/dialogs/dialog-stf-fixed-page.c |  2 +-
 src/gnumeric.css                    | 10 +++++++---
 src/item-grid.c                     |  4 ++--
 4 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/NEWS b/NEWS
index bfea1497e..c85b68ffe 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ Morten:
        * Fix graph size problem affecting image output.  [#507]
        * Check for yelp in autogen.  [#558]
        * Fix ssconvert problem with conditional styles.
+       * Move from style regions to style classes in css.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.48
diff --git a/src/dialogs/dialog-stf-fixed-page.c b/src/dialogs/dialog-stf-fixed-page.c
index c8bcf2b2a..e6f2be76d 100644
--- a/src/dialogs/dialog-stf-fixed-page.c
+++ b/src/dialogs/dialog-stf-fixed-page.c
@@ -564,7 +564,7 @@ cb_treeview_draw (GtkWidget *widget,
 
        context = gtk_widget_get_style_context (GTK_WIDGET (pagedata->dialog));
        gtk_style_context_save (context);
-       gtk_style_context_add_region (context, "fixed-format-ruler", 0);
+       gtk_style_context_add_class (context, "fixed-format-ruler");
        gnm_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
                                     &ruler_color);
        gtk_style_context_restore (context);
diff --git a/src/gnumeric.css b/src/gnumeric.css
index 291b8eb6b..48bca6a38 100644
--- a/src/gnumeric.css
+++ b/src/gnumeric.css
@@ -33,14 +33,14 @@ GnmItemGrid:selected {
 }
 
 /* Function markers are enabled from View->View Properties->Cell Markers */
-GnmItemGrid function-marker {
+GnmItemGrid.function-marker {
   color: #80ff80;
   border-color: #555555;
   /* See also GnmPane */
 }
 
 /* This is the divider between panes when an area is frozen.  */
-GnmItemGrid pane-divider {
+GnmItemGrid.pane-divider {
   color: #333333;
 
   /* This isn't working well yet: */
@@ -223,7 +223,7 @@ GtkDialog GtkTextView.function-help {
 /* This is the vertical line used in the fixed-width part of the stf */
 /* import dialog to show where a new column division will be placed */
 
-GtkDialog#stf-import fixed-format-ruler {
+GtkDialog.fixed-format-ruler {
   color: red;
 }
 
@@ -278,4 +278,8 @@ box > box:last-child > toolbar {
     padding-bottom: 1pt;
 }
 
+dialog.fixed-format-ruler {
+  color: red;
+}
+
 /* ------------------------------------------------------------------------- */
diff --git a/src/item-grid.c b/src/item-grid.c
index e3cf381da..ed304b198 100644
--- a/src/item-grid.c
+++ b/src/item-grid.c
@@ -105,7 +105,7 @@ ig_reload_style (GnmItemGrid *ig)
        GnmPane *pane = GNM_PANE (item->canvas);
 
        gtk_style_context_save (context);
-       gtk_style_context_add_region (context, "function-marker", 0);
+       gtk_style_context_add_class (context, "function-marker");
        gnm_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
                                     &ig->function_marker_color);
        gtk_style_context_get_border_color (context, state,
@@ -113,7 +113,7 @@ ig_reload_style (GnmItemGrid *ig)
        gtk_style_context_restore (context);
 
        gtk_style_context_save (context);
-       gtk_style_context_add_region (context, "pane-divider", 0);
+       gtk_style_context_add_class (context, "pane-divider");
        gnm_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
                                     &ig->pane_divider_color);
        gtk_style_context_get_border (context, GTK_STATE_FLAG_NORMAL, &border);


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