diff options
author | Milan Crha <mcrha@redhat.com> | 2013-04-23 20:59:09 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-04-23 20:59:09 +0800 |
commit | b064d64be7e2e9444721beb7a02038f638edab4c (patch) | |
tree | 35183e5a83eb22078db23835538ea9e07b4b6d2a /em-format/e-mail-formatter-print.c | |
parent | bd48b0a0f42696d2e8cb5eba10a3e0c123e9395d (diff) | |
download | gsoc2013-evolution-b064d64be7e2e9444721beb7a02038f638edab4c.tar gsoc2013-evolution-b064d64be7e2e9444721beb7a02038f638edab4c.tar.gz gsoc2013-evolution-b064d64be7e2e9444721beb7a02038f638edab4c.tar.bz2 gsoc2013-evolution-b064d64be7e2e9444721beb7a02038f638edab4c.tar.lz gsoc2013-evolution-b064d64be7e2e9444721beb7a02038f638edab4c.tar.xz gsoc2013-evolution-b064d64be7e2e9444721beb7a02038f638edab4c.tar.zst gsoc2013-evolution-b064d64be7e2e9444721beb7a02038f638edab4c.zip |
[EMailFormatter] Use GdkRGBA and GtkStyleContext to get theme colors
It could happen that header text color had been picked white one time,
but the other time black as expected (for me usually when I started
Evolution in Calendar and moved to Mail view, the header text color
was white, while when starting in Mail view it was black). The change
to use GtkStyleContext is there only as a cleanup from deprecated
GtkStyle, and to make things easier too, because both GtkStyle
and the GtkStyleContext had set white color for some reason.
Diffstat (limited to 'em-format/e-mail-formatter-print.c')
-rw-r--r-- | em-format/e-mail-formatter-print.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/em-format/e-mail-formatter-print.c b/em-format/e-mail-formatter-print.c index 7e15b93e0f..4d6487d526 100644 --- a/em-format/e-mail-formatter-print.c +++ b/em-format/e-mail-formatter-print.c @@ -175,22 +175,21 @@ mail_formatter_print_run (EMailFormatter *formatter, } static void -mail_formatter_set_style (EMailFormatter *formatter, - GtkStyle *style, - GtkStateType state) +mail_formatter_update_style (EMailFormatter *formatter, + GtkStateFlags state) { EMailFormatterClass *formatter_class; /* White background */ - GdkColor body_color = { 0, G_MAXUINT16, G_MAXUINT16, G_MAXUINT16 }; + GdkRGBA body_color = { 1.0, 1.0, 1.0, 1.0 }; /* Black text */ - GdkColor text_color = { 0, 0, 0, 0 }; + GdkRGBA text_color = { 0.0, 0.0, 0.0, 0.0 }; g_object_freeze_notify (G_OBJECT (formatter)); /* Set the other colors */ formatter_class = E_MAIL_FORMATTER_CLASS (e_mail_formatter_print_parent_class); - formatter_class->set_style (formatter, style, state); + formatter_class->update_style (formatter, state); e_mail_formatter_set_color ( formatter, E_MAIL_FORMATTER_COLOR_FRAME, &body_color); @@ -225,7 +224,7 @@ e_mail_formatter_print_class_init (EMailFormatterPrintClass *class) formatter_class = E_MAIL_FORMATTER_CLASS (class); formatter_class->run = mail_formatter_print_run; - formatter_class->set_style = mail_formatter_set_style; + formatter_class->update_style = mail_formatter_update_style; object_class = G_OBJECT_CLASS (class); object_class->finalize = e_mail_formatter_print_finalize; |