mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-18 03:30:18 +00:00
I fixed a Windows theming regression path in fe_apply_windows_theme() by changing the fallback-disable condition from “a GTK3 theme name is configured” to “a GTK3 theme provider is actually active.” This ensures fallback dark/light palette CSS is still applied when a configured imported GTK3 theme fails to load, preserving Windows release theming behavior instead of leaving mismatched visuals.
I added an in-code explanation documenting this Windows-release safety behavior so the intent is explicit for future maintenance.
This commit is contained in:
@@ -954,8 +954,12 @@ fe_apply_windows_theme (gboolean dark)
|
|||||||
* Otherwise ZoiteChat's fallback dark/light window background CSS can
|
* Otherwise ZoiteChat's fallback dark/light window background CSS can
|
||||||
* clash with theme widget colors (for example white buttons on a dark
|
* clash with theme widget colors (for example white buttons on a dark
|
||||||
* window background).
|
* window background).
|
||||||
|
*
|
||||||
|
* Use the active provider state (not only the configured preference): if
|
||||||
|
* a configured theme fails to load we still want fallback palette CSS so
|
||||||
|
* the app keeps a coherent dark/light appearance on Windows releases.
|
||||||
*/
|
*/
|
||||||
if (prefs.hex_gui_gtk3_theme_name[0] != '\0')
|
if (gtk3_theme_provider != NULL)
|
||||||
{
|
{
|
||||||
if (win_theme_provider && screen)
|
if (win_theme_provider && screen)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user