mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 05:50:27 +00:00
App applies conditional state, supports theme setting
The prior light/dark mode awareness work works on surface-level APIs. As a result, configurations used at the app-level (such as split divider colors, inactive split opacity, etc.) are not aware of the current theme configurations and default to the "light" theme. This commit adds APIs to specify app-level color scheme changes. This changes the configuration for the app and sets the default conditional state to use that new theme. This latter point makes it so that future surfaces use the correct theme on load rather than requiring some apprt event loop ticks. Some users have already reported a short "flicker" to load the correct theme, so this should help alleviate that.
This commit is contained in:
@@ -675,6 +675,7 @@ void ghostty_app_open_config(ghostty_app_t);
|
||||
void ghostty_app_update_config(ghostty_app_t, ghostty_config_t);
|
||||
bool ghostty_app_needs_confirm_quit(ghostty_app_t);
|
||||
bool ghostty_app_has_global_keybinds(ghostty_app_t);
|
||||
void ghostty_app_set_color_scheme(ghostty_app_t, ghostty_color_scheme_e);
|
||||
|
||||
ghostty_surface_config_s ghostty_surface_config_new();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user