Switched palette type selection and color conversion helpers to use the HAVE_GTK3 guard consistently in palette definitions and helpers.

Updated GTK3-specific palette color storage handling in DCC, notify, and user list views to align with HAVE_GTK3 guards.
Standardized setup color application and dialog logic to use HAVE_GTK3 branches for GTK3/GTK2 separation.
This commit is contained in:
2026-01-31 13:38:05 -07:00
parent d314856f82
commit 1fb1865aca
6 changed files with 18 additions and 18 deletions

View File

@@ -24,7 +24,7 @@
#include "xtext-color.h"
#if GTK_CHECK_VERSION(3,0,0)
#if HAVE_GTK3
typedef GdkRGBA PaletteColor;
#define PALETTE_GDK_TYPE GDK_TYPE_RGBA
#define PALETTE_FOREGROUND_PROPERTY "foreground-rgba"
@@ -39,7 +39,7 @@ extern PaletteColor colors[];
static inline void
palette_color_get_rgb16 (const PaletteColor *color, guint16 *red, guint16 *green, guint16 *blue)
{
#if GTK_CHECK_VERSION(3,0,0)
#if HAVE_GTK3
*red = (guint16) CLAMP (color->red * 65535.0 + 0.5, 0.0, 65535.0);
*green = (guint16) CLAMP (color->green * 65535.0 + 0.5, 0.0, 65535.0);
*blue = (guint16) CLAMP (color->blue * 65535.0 + 0.5, 0.0, 65535.0);