summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2024-11-22 13:42:48 -0800
committerMitchell Hashimoto <m@mitchellh.com>2024-11-22 14:08:35 -0800
commitcd49015243b794cf51ca30e8d32f09d4d362925f (patch)
tree610a0ec55cfa6ff8afae452c68cf72c817e14300 /include
parent958316d85172c12c00c8012f90c5406861b7a11e (diff)
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.
Diffstat (limited to 'include')
-rw-r--r--include/ghostty.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ghostty.h b/include/ghostty.h
index 681a4e9dc..d2e59b09f 100644
--- a/include/ghostty.h
+++ b/include/ghostty.h
@@ -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();