Change the negative numbers CSS class name to new format

Change from negative-numbers to gnc-class-negative-numbers
This commit is contained in:
Robert Fewell
2020-02-17 13:36:11 +00:00
parent e7cfcb3f70
commit 2b2fa8476e
6 changed files with 13 additions and 13 deletions

View File

@@ -70,13 +70,13 @@ gnc_set_label_color(GtkWidget *label, gnc_numeric value)
if (deficit)
{
gnc_widget_style_context_remove_class (GTK_WIDGET(label), "default-color");
gnc_widget_style_context_add_class (GTK_WIDGET(label), "negative-numbers");
gnc_widget_style_context_remove_class (GTK_WIDGET(label), "gnc-class-default-color");
gnc_widget_style_context_add_class (GTK_WIDGET(label), "gnc-class-negative-numbers");
}
else
{
gnc_widget_style_context_remove_class (GTK_WIDGET(label), "negative-numbers");
gnc_widget_style_context_add_class (GTK_WIDGET(label), "default-color");
gnc_widget_style_context_remove_class (GTK_WIDGET(label), "gnc-class-negative-numbers");
gnc_widget_style_context_add_class (GTK_WIDGET(label), "gnc-class-default-color");
}
}
@@ -889,7 +889,7 @@ gnc_cost_policy_select_new (void)
return cost_policy_widget;
}
/* This function returns a string for the CSS 'negative-numbers' class,
/* This function returns a string for the CSS 'gnc-class-negative-numbers' class,
* the returned string must be freed
*/
gchar*
@@ -898,7 +898,7 @@ gnc_get_negative_color (void)
GdkRGBA color;
GtkWidget *label = gtk_label_new ("Color");
GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET(label));
gtk_style_context_add_class (context, "negative-numbers");
gtk_style_context_add_class (context, "gnc-class-negative-numbers");
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &color);
return gdk_rgba_to_string (&color);

View File

@@ -161,7 +161,7 @@ gboolean gnc_new_book_option_display (GtkWidget *parent);
GtkWidget *
gnc_cost_policy_select_new (void);
/** This function returns the color string for the CSS 'negative-numbers' class,
/** This function returns the color string for the CSS 'gnc-class-negative-numbers' class,
* the returned value must be freed.
*/
gchar* gnc_get_negative_color (void);

View File

@@ -450,7 +450,7 @@ get_negative_color_str (void)
gchar *color_str;
GtkWidget *label = gtk_label_new ("Color");
GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET(label));
gtk_style_context_add_class (context, "negative-numbers");
gtk_style_context_add_class (context, "gnc-class-negative-numbers");
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &color);
rgba = gdk_rgba_copy (&color);

View File

@@ -4,11 +4,11 @@
/* Negative value label colors */
.default-color {
.gnc-class-default-color {
color: @default-color;
}
.negative-numbers {
.gnc-class-negative-numbers {
color: @negative-numbers;
}

View File

@@ -4,11 +4,11 @@
/* Negative value label colors */
.default-color {
.gnc-class-default-color {
color: @default-color;
}
.negative-numbers {
.gnc-class-negative-numbers {
color: @negative-numbers;
}

View File

@@ -2525,7 +2525,7 @@ gnucash_get_style_classes (GnucashSheet *sheet, GtkStyleContext *stylectxt,
if (field_type >= COLOR_NEGATIVE) // Require a Negative fg color
{
gtk_style_context_add_class (stylectxt, "negative-numbers");
gtk_style_context_add_class (stylectxt, "gnc-class-negative-numbers");
field_type -= COLOR_NEGATIVE;
}
else