summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-01-08 17:25:53 +0100
committerraveit65 <[email protected]>2017-02-17 12:28:22 +0100
commit51280ca46635b75a756c67a87a6db7fa2fc1d058 (patch)
tree59009277c3e68660bf4e9916a88ef9806752fc1a
parentb48fe1c747315f98fb2d0783f51a6363fb659cde (diff)
downloadmate-control-center-51280ca46635b75a756c67a87a6db7fa2fc1d058.tar.bz2
mate-control-center-51280ca46635b75a756c67a87a6db7fa2fc1d058.tar.xz
Fontviewer: make sure rendered text is black on white
Also, don't use deprecated GTK API 'gtk_widget_modify_bg' to set this.
-rw-r--r--font-viewer/font-view.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/font-viewer/font-view.c b/font-viewer/font-view.c
index f2f01e57..a62a75e8 100644
--- a/font-viewer/font-view.c
+++ b/font-viewer/font-view.c
@@ -388,7 +388,8 @@ font_view_application_do_open (FontViewApplication *self)
{
gchar *uri;
GtkWidget *font_widget;
- GdkColor white = { 0, 0xffff, 0xffff, 0xffff };
+ GdkRGBA white = { 1.0, 1.0, 1.0, 1.0 };
+ GdkRGBA black = { 0.0, 0.0, 0.0, 1.0 };
GtkWidget *w;
w = gtk_bin_get_child (GTK_BIN (self->swin_preview));
@@ -420,7 +421,8 @@ font_view_application_do_open (FontViewApplication *self)
uri = g_file_get_uri (self->font_file);
self->font_widget = font_widget = GTK_WIDGET (sushi_font_widget_new (uri));
- gtk_widget_modify_bg (font_widget, GTK_STATE_NORMAL, &white);
+ gtk_widget_override_color (font_widget, GTK_STATE_NORMAL, &black);
+ gtk_widget_override_background_color (font_widget, GTK_STATE_FLAG_NORMAL, &white);
g_free (uri);
w = gtk_viewport_new (NULL, NULL);