From 395dadf6e3a5366d128ce823e09203ca972b8e7b Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 19 Nov 2025 17:48:44 +0100 Subject: [PATCH] feat: add option to disable modal dim effect For some terminal themes is cooler to not dim the screen when palettes are showing. --- src/config.zig | 1 + src/tui/ModalBackground.zig | 1 + 2 files changed, 2 insertions(+) diff --git a/src/config.zig b/src/config.zig index bb6367b..60993d8 100644 --- a/src/config.zig +++ b/src/config.zig @@ -9,6 +9,7 @@ gutter_line_numbers_style: DigitStyle = .ascii, gutter_symbols: bool = true, enable_terminal_cursor: bool = true, enable_terminal_color_scheme: bool = false, +enable_modal_dim: bool = true, highlight_current_line: bool = true, highlight_current_line_gutter: bool = true, highlight_columns: []const u16 = &.{ 80, 100, 120 }, diff --git a/src/tui/ModalBackground.zig b/src/tui/ModalBackground.zig index 4bc1630..fb3c39b 100644 --- a/src/tui/ModalBackground.zig +++ b/src/tui/ModalBackground.zig @@ -87,6 +87,7 @@ pub fn State(ctx_type: type) type { } pub fn render(self: *Self, theme: *const Widget.Theme) bool { + if (!tui.config().enable_modal_dim) return false; return self.opts.on_render(self.opts.ctx, self, theme); }