Remove the CSS for a dark theme Register

It was decided that this is not required as the user can choose the
required colours by setting the preference to not use the built in
register colours.
This commit is contained in:
Robert Fewell 2017-09-29 10:15:06 +01:00
parent 3f17ed6c93
commit 549b07ae66
4 changed files with 4 additions and 58 deletions

View File

@ -32,11 +32,6 @@ cursor button {
background-color: @register_header_bg_color;
}
.app-header-dark {
background-color: shade (@register_header_bg_color, 0.7);
}
*.app-primary {
background-color: @register_primary_bg_color;
}
@ -45,15 +40,6 @@ cursor button {
background-color: mix (@register_primary_bg_color, grey, 0.2);
}
*.app-primary-dark {
background-color: shade (@register_primary_bg_color, 0.7);
}
*.app-primary-dark:insensitive {
background-color: mix (shade (@register_primary_bg_color, 0.7), grey, 0.3);
}
*.app-secondary {
background-color: @register_secondary_bg_color;
}
@ -62,15 +48,6 @@ cursor button {
background-color: mix (@register_secondary_bg_color, grey, 0.2);
}
*.app-secondary-dark {
background-color: shade (@register_secondary_bg_color, 0.5);
}
*.app-secondary-dark:insensitive {
background-color: mix (shade (@register_secondary_bg_color, 0.5), grey, 0.3);
}
*.app-split {
background-color: @register_split_bg_color;
}
@ -79,15 +56,6 @@ cursor button {
background-color: mix (@register_split_bg_color, grey, 0.2);
}
*.app-split-dark {
background-color: shade (@register_split_bg_color, 0.5);
}
*.app-split-dark:insensitive {
background-color: mix (shade (@register_split_bg_color, 0.5), grey, 0.3);
}
*.app-cursor {
background-color: @register_cursor_bg_color;
}
@ -96,11 +64,3 @@ cursor button {
background-color: mix (@register_cursor_bg_color, grey, 0.2);
}
*.app-cursor-dark {
background-color: shade (@register_cursor_bg_color, 0.6);
}
*.app-cursor-dark:insensitive {
background-color: mix (shade (@register_cursor_bg_color, 0.6), grey, 0.3);
}

View File

@ -497,10 +497,7 @@ draw_cell (GnucashSheet *sheet,
&& (virt_loc.vcell_loc.virt_row < table->model->dividing_row_upper))
{
// Make text color greyed
if (sheet->dark_theme)
gtk_style_context_add_class (stylectxt, "darker-grey-mix");
else
gtk_style_context_add_class (stylectxt, "lighter-grey-mix");
gtk_style_context_add_class (stylectxt, "lighter-grey-mix");
}
#endif
@ -515,10 +512,7 @@ draw_cell (GnucashSheet *sheet,
goto exit;
// Make text color greyed
if (sheet->dark_theme)
gtk_style_context_add_class (stylectxt, "darker-grey-mix");
else
gtk_style_context_add_class (stylectxt, "lighter-grey-mix");
gtk_style_context_add_class (stylectxt, "lighter-grey-mix");
pango_layout_set_text (layout, text, strlen (text));
pango_font_description_set_style (font, PANGO_STYLE_ITALIC);

View File

@ -1127,15 +1127,12 @@ gnucash_sheet_draw_cb (GtkWidget *widget, cairo_t *cr, G_GNUC_UNUSED gpointer da
GnucashSheet *sheet = GNUCASH_SHEET (widget);
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkAllocation alloc;
GdkRGBA color;
gboolean result; //FIXME
gtk_widget_get_allocation(widget, &alloc);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BACKGROUND);
gtk_render_background (context, cr, 0, 0, alloc.width, alloc.height);
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &color);
sheet->dark_theme = gnc_is_dark_theme (&color);
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_BACKGROUND);
//FIXME what should be done with result being TRUE or FALSE
@ -2465,12 +2462,8 @@ gnucash_get_style_classes (GnucashSheet *sheet, GtkStyleContext *stylectxt,
full_class = g_strconcat (style_class, "-color", NULL);
}
else
{
if (sheet->dark_theme)
full_class = g_strconcat ("app-", style_class, "-dark", NULL);
else
full_class = g_strconcat ("app-", style_class, NULL);
}
full_class = g_strconcat ("app-", style_class, NULL);
gtk_style_context_add_class (stylectxt, full_class);
g_free (full_class);

View File

@ -66,7 +66,6 @@ struct _GnucashSheet
gboolean use_theme_colors;
gboolean use_horizontal_lines;
gboolean use_vertical_lines;
gboolean dark_theme;
gboolean input_cancelled;