[gnome-games] glines: Fix background colour selection



commit d3b3efad38b1be5869b6264e0cb44c46effe57ea
Author: Robert Ancell <robert ancell canonical com>
Date:   Sun Feb 5 17:52:11 2012 +1100

    glines: Fix background colour selection

 glines/src/glines.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glines/src/glines.c b/glines/src/glines.c
index f39ab23..8134f07 100644
--- a/glines/src/glines.c
+++ b/glines/src/glines.c
@@ -1282,7 +1282,7 @@ bg_color_callback (GtkWidget * widget, gpointer data)
 
   gtk_color_button_get_rgba (GTK_COLOR_BUTTON (widget), &c);
 
-  g_snprintf (str, sizeof (str), "#%04x%04x%04x", (int) (c.red * 255 + 0.5), (int) (c.green * 255 + 0.5), (int) (c.blue * 255 + 0.5));
+  g_snprintf (str, sizeof (str), "#%04x%04x%04x", (int) (c.red * 65535 + 0.5), (int) (c.green * 65535 + 0.5), (int) (c.blue * 65535 + 0.5));
 
   g_settings_set_string (settings, KEY_BACKGROUND_COLOR, str);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]