mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-12 16:50:19 +00:00
Updated RGB16 palette parsing to use 16-bit RGBA strings with gdk_rgba_parse for GTK3 builds.
Parsed palette colors before initializing the GTK3 color chooser dialog to ensure RGBA normalization. Switched GTK3 GtkCellRendererText foreground bindings to foreground-rgba with GTK2 fallbacks in user list, notify, and DCC views.
This commit is contained in:
@@ -1595,12 +1595,18 @@ setup_color_cb (GtkWidget *button, gpointer userdata)
|
||||
GtkWidget *dialog;
|
||||
PaletteColor *color;
|
||||
GdkRGBA rgba;
|
||||
gboolean parsed_ok;
|
||||
char *color_string;
|
||||
setup_color_dialog_data *data;
|
||||
|
||||
color = &colors[GPOINTER_TO_INT (userdata)];
|
||||
|
||||
dialog = gtk_color_chooser_dialog_new (_("Select color"), GTK_WINDOW (setup_window));
|
||||
rgba = *color;
|
||||
color_string = gdk_rgba_to_string (color);
|
||||
parsed_ok = gdk_rgba_parse (&rgba, color_string);
|
||||
g_free (color_string);
|
||||
if (!parsed_ok)
|
||||
rgba = *color;
|
||||
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (dialog), &rgba);
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user