From 8866e27da7eb01d9d2fcfe7e0c7e040dcddce3eb Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 18 Dec 2025 15:23:59 +0100 Subject: [PATCH] refactor: allow palettes to override widget style --- src/tui/mode/overlay/palette.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tui/mode/overlay/palette.zig b/src/tui/mode/overlay/palette.zig index f63e8c4..7684b7c 100644 --- a/src/tui/mode/overlay/palette.zig +++ b/src/tui/mode/overlay/palette.zig @@ -20,7 +20,7 @@ const ModalBackground = @import("../../ModalBackground.zig"); pub const Menu = @import("../../Menu.zig"); const max_menu_width = 80; -const widget_type: Widget.Type = .palette; +const default_widget_type: Widget.Type = .palette; pub const Placement = enum { top_center, @@ -54,6 +54,7 @@ pub fn Create(options: type) type { const Entry = options.Entry; const Self = @This(); const ValueType = if (@hasDecl(options, "ValueType")) options.ValueType else void; + const widget_type: Widget.Type = if (@hasDecl(options, "widget_type")) options.widget_type else default_widget_type; pub const MenuType = Menu.Options(*Self).MenuType; pub const ButtonType = MenuType.ButtonType;