mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Change the negative numbers CSS class name to new format
Change from negative-numbers to gnc-class-negative-numbers
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user