From f7134df47c65505f692f77a9c3627d663f6d509c Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 18 Nov 2025 18:00:01 +0100 Subject: [PATCH] refactor: allow palettes to disable dimming --- src/tui/mode/overlay/palette.zig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tui/mode/overlay/palette.zig b/src/tui/mode/overlay/palette.zig index 89d1866..9799421 100644 --- a/src/tui/mode/overlay/palette.zig +++ b/src/tui/mode/overlay/palette.zig @@ -64,6 +64,13 @@ pub fn Create(options: type) type { .modal = try ModalBackground.create(*Self, allocator, tui.mainview_widget(), .{ .ctx = self, .on_click = mouse_palette_menu_cancel, + .on_render = if (@hasDecl(options, "modal_dim")) + if (options.modal_dim) + ModalBackground.Options(*Self).on_render_dim + else + ModalBackground.Options(*Self).on_render_default + else + ModalBackground.Options(*Self).on_render_default, }), .menu = try Menu.create(*Self, allocator, tui.plane(), .{ .ctx = self,