From 73aa6e20d278d89e76112022e7cf7c872f43f6d2 Mon Sep 17 00:00:00 2001
From: Bruce Cowan <bruce@bcowan.me.uk>
Date: Wed, 8 Jan 2020 23:43:28 +0000
Subject: [PATCH] Change CSS class names to something more sensible

---
 data/rugby.css                 | 10 +++++-----
 src/rugby-possibility-widget.c | 12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/data/rugby.css b/data/rugby.css
index 532b430..828c430 100644
--- a/data/rugby.css
+++ b/data/rugby.css
@@ -1,14 +1,14 @@
 /*
- * SPDX-FileCopyrightText: 2012-2018 Bruce Cowan <bruce@bcowan.me.uk>
+ * SPDX-FileCopyrightText: 2012-2020 Bruce Cowan <bruce@bcowan.me.uk>
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
-.level-cell.fill-block
+.possibility.score-block
 {
     border-radius: 10px;
 }
 
-.level-cell.fill-block.score-try
+.possibility.score-block.try
 {
     /* Scarlet red */
     background-image: linear-gradient(to top,
@@ -16,7 +16,7 @@
                                       #cc0000);
 }
 
-.level-cell.fill-block.score-utry
+.possibility.score-block.utry
 {
     /* Chameleon */
     background-image: linear-gradient(to top,
@@ -24,7 +24,7 @@
                                       #73d216);
 }
 
-.level-cell.fill-block.score-kick
+.possibility.score-block.kick
 {
     /* Butter */
     background-image: linear-gradient(to top,
diff --git a/src/rugby-possibility-widget.c b/src/rugby-possibility-widget.c
index f7d2ecd..173d0e7 100644
--- a/src/rugby-possibility-widget.c
+++ b/src/rugby-possibility-widget.c
@@ -1,5 +1,5 @@
 /*
- * SPDX-FileCopyrightText: 2018 Bruce Cowan <bruce@bcowan.me.uk>
+ * SPDX-FileCopyrightText: 2018, 2020 Bruce Cowan <bruce@bcowan.me.uk>
  * SPDX-License-Identifier: GPL-3.0-or-later
  */
 
@@ -109,7 +109,7 @@ rugby_possibility_widget_draw (GtkWidget *widget,
 
     GtkStyleContext *context = gtk_widget_get_style_context (widget);
     gtk_style_context_save (context);
-    gtk_style_context_add_class (context, "level-cell");
+    gtk_style_context_add_class (context, "possibility");
 
     gtk_render_background (context, cr, x, y, width, height);
     gtk_render_frame (context, cr, x, y, width, height);
@@ -123,13 +123,13 @@ rugby_possibility_widget_draw (GtkWidget *widget,
                   NULL);
     int score = tries * 7 + utries * 5 + kicks * 3;
 
-    gtk_style_context_add_class (context, "fill-block");
+    gtk_style_context_add_class (context, "score-block");
 
     // Tries
     double w = width / (score / 7.0);
     for (int i = 0; i < tries; i++)
     {
-        render_bar (cr, context, x, y, w, height, "score-try");
+        render_bar (cr, context, x, y, w, height, "try");
         x += w;
     }
 
@@ -137,7 +137,7 @@ rugby_possibility_widget_draw (GtkWidget *widget,
     w = width / (score / 5.0);
     for (int i = 0; i < utries; i++)
     {
-        render_bar (cr, context, x, y, w, height, "score-utry");
+        render_bar (cr, context, x, y, w, height, "utry");
         x += w;
     }
 
@@ -145,7 +145,7 @@ rugby_possibility_widget_draw (GtkWidget *widget,
     w = width / (score / 3.0);
     for (int i = 0; i < kicks; i++)
     {
-        render_bar (cr, context, x, y, w, height, "score-kick");
+        render_bar (cr, context, x, y, w, height, "kick");
         x += w;
     }
 
-- 
GitLab