[gnome-applets] stickynotes: don't ignore font color
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] stickynotes: don't ignore font color
- Date: Tue, 13 Oct 2015 02:22:00 +0000 (UTC)
commit 107534eb0cc2ebb45622295b7e9a1a0280e32e0e
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Oct 13 05:01:31 2015 +0300
stickynotes: don't ignore font color
https://bugzilla.gnome.org/show_bug.cgi?id=753272
stickynotes/stickynotes.c | 25 ++++---------------------
1 files changed, 4 insertions(+), 21 deletions(-)
---
diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c
index 5b33d9a..c40b2dd 100644
--- a/stickynotes/stickynotes.c
+++ b/stickynotes/stickynotes.c
@@ -545,33 +545,16 @@ stickynote_set_color (StickyNote *note,
if (font_color_str_actual)
{
GdkRGBA color;
- GdkColor font_color;
gdk_rgba_parse (&color, font_color_str_actual);
- font_color.red = color.red;
- font_color.green = color.green;
- font_color.blue = color.blue;
-
- gtk_widget_modify_text (note->w_window,
- GTK_STATE_NORMAL, &font_color);
- gtk_widget_modify_text (note->w_window,
- GTK_STATE_PRELIGHT, &font_color);
- gtk_widget_modify_text (note->w_body,
- GTK_STATE_NORMAL, &font_color);
- gtk_widget_modify_text (note->w_body,
- GTK_STATE_NORMAL, &font_color);
+ gtk_widget_override_color (note->w_window, GTK_STATE_NORMAL, &color);
+ gtk_widget_override_color (note->w_body, GTK_STATE_NORMAL, &color);
}
else
{
- gtk_widget_modify_text (note->w_window,
- GTK_STATE_NORMAL, NULL);
- gtk_widget_modify_text (note->w_window,
- GTK_STATE_PRELIGHT, NULL);
- gtk_widget_modify_text (note->w_body,
- GTK_STATE_NORMAL, NULL);
- gtk_widget_modify_text (note->w_body,
- GTK_STATE_NORMAL, NULL);
+ gtk_widget_override_color (note->w_window, GTK_STATE_NORMAL, NULL);
+ gtk_widget_override_color (note->w_body, GTK_STATE_NORMAL, NULL);
}
if (color_str_actual)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]