dark mode v1

This commit is contained in:
2026-01-12 21:24:09 -07:00
parent c1cbe14871
commit e265ad4454
3 changed files with 170 additions and 72 deletions

View File

@@ -38,12 +38,21 @@ void palette_alloc (GtkWidget * widget);
void palette_load (void);
void palette_save (void);
/* Keep a copy of the user's palette so dark mode can be toggled without losing it. */
void palette_user_set_color (int idx, const GdkColor *col);
/*
* Apply ZoiteChat's built-in "dark mode" background/foreground overrides.
* Apply ZoiteChat's built-in "dark mode" palette.
*
* This is intentionally conservative: it only adjusts the palette if the
* colors are still at ZoiteChat's stock defaults, so user-customized palettes
* continue to take precedence.
* When enabled, ZoiteChat switches to a curated dark-friendly palette for:
* - message colors (mIRC palette)
* - selection colors
* - tab highlight colors
* - chat/user/channel list background + foreground
*
* The user's palette is preserved in-memory and written to colors.conf even
* while dark mode is enabled, so disabling dark mode restores the previous
* colors without surprises.
*
* Returns TRUE if any palette entries were changed.
*/