Skip to content
Snippets Groups Projects
Commit 73aa6e20 authored by Bruce Cowan's avatar Bruce Cowan :airplane:
Browse files

Change CSS class names to something more sensible

parent 0b2d6dd1
No related branches found
No related tags found
No related merge requests found
Pipeline #2667 passed
/*
* 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,
......
/*
* 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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment