mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-12 08:40:19 +00:00
Centralized the palette foreground property definition for GTK2/GTK3 and applied it to the user list, notify list, and DCC tree renderers to use RGBA where supported.
Removed legacy colormap allocation/free calls in palette handling and setup color selection while preserving the GTK2 path logic.
This commit is contained in:
@@ -1559,9 +1559,7 @@ setup_color_ok_cb (GtkWidget *button, GtkWidget *dialog)
|
||||
{
|
||||
GtkColorSelectionDialog *cdialog = GTK_COLOR_SELECTION_DIALOG (dialog);
|
||||
GdkColor *col;
|
||||
GdkColor old_color;
|
||||
col = g_object_get_data (G_OBJECT (button), "c");
|
||||
old_color = *col;
|
||||
|
||||
button = g_object_get_data (G_OBJECT (button), "b");
|
||||
|
||||
@@ -1575,17 +1573,8 @@ setup_color_ok_cb (GtkWidget *button, GtkWidget *dialog)
|
||||
|
||||
gtk_color_selection_get_current_color (GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (cdialog)), col);
|
||||
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
gdk_colormap_alloc_color (gtk_widget_get_colormap (button), col, TRUE, TRUE);
|
||||
#endif
|
||||
|
||||
setup_color_button_apply (button, col);
|
||||
|
||||
/* is this line correct?? */
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
gdk_colormap_free_colors (gtk_widget_get_colormap (button), &old_color, 1);
|
||||
#endif
|
||||
|
||||
/* Persist custom colors for the palette the user is editing. */
|
||||
if (fe_dark_mode_is_enabled_for (setup_prefs.hex_gui_dark_mode))
|
||||
palette_dark_set_color ((int)(col - colors), col);
|
||||
|
||||
Reference in New Issue
Block a user