mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-12 00:30:19 +00:00
Updated setup color dialog RGBA derivation to parse hex palette components with gdk_rgba_parse for GTK3 paths.
Standardized GtkCellRendererText foreground color binding to use the palette foreground property macro across user list, DCC, and notify views.
This commit is contained in:
@@ -1536,9 +1536,12 @@ typedef struct
|
||||
static void
|
||||
setup_rgba_from_palette (const PaletteColor *color, GdkRGBA *rgba)
|
||||
{
|
||||
g_autofree char *color_string = gdk_rgba_to_string (color);
|
||||
guint16 red, green, blue;
|
||||
char color_string[16];
|
||||
|
||||
if (!color_string || !gdk_rgba_parse (rgba, color_string))
|
||||
palette_color_get_rgb16 (color, &red, &green, &blue);
|
||||
g_snprintf (color_string, sizeof (color_string), "#%04x%04x%04x", red, green, blue);
|
||||
if (!gdk_rgba_parse (rgba, color_string))
|
||||
*rgba = *color;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user