mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-12 16:50:19 +00:00
Updated GTK3 color parsing in the palette/setup helpers to use RGBA-friendly hex strings with gdk_rgba_parse fallbacks while preserving GTK2 behavior.
Switched GtkCellRendererText foreground property selection to foreground-rgba on GTK3 paths (with GTK2 guarded), covering userlist, notify, and DCC views.
This commit is contained in:
@@ -1537,10 +1537,11 @@ static void
|
||||
setup_rgba_from_palette (const PaletteColor *color, GdkRGBA *rgba)
|
||||
{
|
||||
guint16 red, green, blue;
|
||||
char color_string[16];
|
||||
char color_string[8];
|
||||
|
||||
palette_color_get_rgb16 (color, &red, &green, &blue);
|
||||
g_snprintf (color_string, sizeof (color_string), "#%04x%04x%04x", red, green, blue);
|
||||
g_snprintf (color_string, sizeof (color_string), "#%02x%02x%02x",
|
||||
red >> 8, green >> 8, blue >> 8);
|
||||
if (!gdk_rgba_parse (rgba, color_string))
|
||||
{
|
||||
rgba->red = red / 65535.0;
|
||||
|
||||
Reference in New Issue
Block a user