Updated fe_ctrl_gui()’s FE_GUI_APPLY branch to match the Preferences → Theme apply sequence by loading palette data first, then re-applying current dark-mode state, and only then calling setup_apply_real(TRUE, TRUE, TRUE, FALSE);.

Added an inline regression-prevention comment noting this path should stay in parity with setup_theme_apply_cb.

    Verified palette.h is already included in src/fe-gtk/fe-gtk.c (no include changes required).
This commit is contained in:
2026-02-25 23:27:21 -07:00
parent ac2ab1443c
commit 440e9ecf5a

View File

@@ -1588,6 +1588,9 @@ fe_ctrl_gui (session *sess, fe_gui_action action, int arg)
mg_detach (sess, arg); /* arg: 0=toggle 1=detach 2=attach */
break;
case FE_GUI_APPLY:
/* Keep parity with Preferences -> Theme apply path (setup_theme_apply_cb). */
palette_load ();
palette_apply_dark_mode (fe_dark_mode_is_enabled ());
setup_apply_real (TRUE, TRUE, TRUE, FALSE);
}
}