mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-16 18:50:19 +00:00
Standardized GtkCellRendererText foreground bindings to use the palette foreground property macro across user list, notify list, and DCC views (GTK2/GTK3 aware).
Generated GTK3 caret-color CSS using GdkRGBA string conversion instead of manual RGB math for input styling. Simplified palette RGB16 parsing by building a GdkRGBA-compatible color string before parsing.
This commit is contained in:
@@ -48,12 +48,13 @@ static void
|
||||
palette_color_set_rgb16 (PaletteColor *color, guint16 red, guint16 green, guint16 blue)
|
||||
{
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
char buf[8];
|
||||
GdkRGBA parsed;
|
||||
gboolean parsed_ok;
|
||||
char *color_string;
|
||||
|
||||
g_snprintf (buf, sizeof (buf), "#%02x%02x%02x", red >> 8, green >> 8, blue >> 8);
|
||||
parsed_ok = gdk_rgba_parse (&parsed, buf);
|
||||
color_string = g_strdup_printf ("#%02x%02x%02x", red >> 8, green >> 8, blue >> 8);
|
||||
parsed_ok = gdk_rgba_parse (&parsed, color_string);
|
||||
g_free (color_string);
|
||||
if (!parsed_ok)
|
||||
{
|
||||
parsed.red = red / 65535.0;
|
||||
|
||||
Reference in New Issue
Block a user