mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-16 18:50:19 +00:00
Parse GTK3 palette RGB16 values into explicit GdkRGBA structs before assignment in the palette helper.
Copy RGBA values from the GTK color chooser into palette entries for the setup dialog path. Added RGBA-aware list-store color helpers and usage for userlist, notify, and DCC views to keep color handling consistent across GTK versions.
This commit is contained in:
@@ -49,9 +49,11 @@ palette_color_set_rgb16 (PaletteColor *color, guint16 red, guint16 green, guint1
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
char buf[8];
|
||||
GdkRGBA parsed;
|
||||
|
||||
g_snprintf (buf, sizeof (buf), "#%02x%02x%02x", red >> 8, green >> 8, blue >> 8);
|
||||
gdk_rgba_parse (color, buf);
|
||||
gdk_rgba_parse (&parsed, buf);
|
||||
*color = parsed;
|
||||
#else
|
||||
color->red = red;
|
||||
color->green = green;
|
||||
|
||||
Reference in New Issue
Block a user