[gnome-color-manager] trivial: ensure we force a refresh of the GcmSampleWindow after changing the color
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: ensure we force a refresh of the GcmSampleWindow after changing the color
- Date: Tue, 3 Aug 2010 16:08:03 +0000 (UTC)
commit aff33670e77a20924c09b595534bf76f304b3349
Author: Richard Hughes <richard hughsie com>
Date: Tue Aug 3 12:40:44 2010 +0100
trivial: ensure we force a refresh of the GcmSampleWindow after changing the color
libcolor-glib/gcm-sample-window.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libcolor-glib/gcm-sample-window.c b/libcolor-glib/gcm-sample-window.c
index 5c39896..20affb3 100644
--- a/libcolor-glib/gcm-sample-window.c
+++ b/libcolor-glib/gcm-sample-window.c
@@ -124,6 +124,7 @@ gcm_sample_window_set_color (GcmSampleWindow *sample_window, guint8 red, guint8
gtk_window_get_size (window, &width, &height);
/* if no pixbuf, create it */
+ egg_debug ("setting RGB: %f, %f, %f", color->R, color->G, color->B);
pixbuf = gtk_image_get_pixbuf (GTK_IMAGE (sample_window->priv->image));
if (pixbuf == NULL) {
data = g_new0 (guchar, width*height*3);
@@ -142,6 +143,10 @@ gcm_sample_window_set_color (GcmSampleWindow *sample_window, guint8 red, guint8
pixels[i+1] = green;
pixels[i+2] = blue;
}
+
+ /* force redraw */
+ gtk_widget_set_visible (sample_window->priv->image, FALSE);
+ gtk_widget_set_visible (sample_window->priv->image, TRUE);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]