[Xfce4-commits] [apps/xfce4-terminal] 02/03: Fix colors handling in preferences

noreply at xfce.org noreply at xfce.org
Wed Jun 15 21:38:46 CEST 2016


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository apps/xfce4-terminal.

commit b5cadd81d0cdded58dac9655617bc29e388b47d9
Author: Igor <f2404 at yandex.ru>
Date:   Tue Jun 14 11:37:26 2016 +0300

    Fix colors handling in preferences
    
    Signed-off-by: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
---
 terminal/terminal-preferences.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/terminal/terminal-preferences.c b/terminal/terminal-preferences.c
index d47958d..2dabbe2 100644
--- a/terminal/terminal-preferences.c
+++ b/terminal/terminal-preferences.c
@@ -153,13 +153,13 @@ transform_color_to_string (const GValue *src,
                            GValue       *dst)
 {
   GdkRGBA *color;
-  gchar    buffer[8];
+  gchar    buffer[16];
 
   color = g_value_get_boxed (src);
-  g_snprintf (buffer, sizeof (buffer), "#%02x%02x%02x",
-              (guint) (color->red * 255),
-              (guint) (color->green * 255),
-              (guint) (color->blue * 255));
+  g_snprintf (buffer, sizeof (buffer), "#%04x%04x%04x",
+              (guint) (color->red * 65535),
+              (guint) (color->green * 65535),
+              (guint) (color->blue * 65535));
   g_value_set_string (dst, buffer);
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list