diff --git a/src/config.zig b/src/config.zig index 571cb70..9ce0f2d 100644 --- a/src/config.zig +++ b/src/config.zig @@ -74,6 +74,7 @@ pane_left_style: WidgetStyle = .bar_right, pane_right_style: WidgetStyle = .bar_left, pane_style: PaneStyle = .panel, hint_window_style: WidgetStyle = .thick_boxed, +info_box_style: WidgetStyle = .bar_left, centered_view: bool = false, centered_view_width: usize = 145, @@ -119,6 +120,7 @@ pub const WidgetType = enum { pane_left, pane_right, hint_window, + info_box, dropdown, }; diff --git a/src/tui/WidgetStyle.zig b/src/tui/WidgetStyle.zig index 00a447b..641c150 100644 --- a/src/tui/WidgetStyle.zig +++ b/src/tui/WidgetStyle.zig @@ -169,6 +169,7 @@ pub fn theme_style_from_type(style_type: WidgetType, theme: *const Theme) Theme. .editor => .{ .fg = theme.editor_widget.bg, .bg = theme.editor.bg }, }, .hint_window => .{ .fg = theme.editor_widget_border.fg, .bg = theme.editor_widget.bg }, + .info_box => .{ .fg = theme.editor_widget_border.fg, .bg = theme.editor_widget.bg }, }; } diff --git a/src/tui/tui.zig b/src/tui/tui.zig index cef9e45..ca4da69 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -1663,6 +1663,13 @@ const cmds = struct { } pub const dropdown_next_widget_style_meta: Meta = .{}; + pub fn info_box_widget_style(_: *Self, _: Ctx) Result { + set_next_style(.info_box); + need_render(@src()); + try save_config(); + } + pub const info_box_widget_style_meta: Meta = .{}; + pub fn enable_fast_scroll(self: *Self, _: Ctx) Result { self.fast_scroll_ = true; } @@ -2355,6 +2362,7 @@ pub fn get_widget_style(widget_type: WidgetType) *const WidgetStyle { .pane_left => WidgetStyle.from_tag(config_.pane_left_style), .pane_right => WidgetStyle.from_tag(config_.pane_right_style), .hint_window => WidgetStyle.from_tag(config_.hint_window_style), + .info_box => WidgetStyle.from_tag(config_.info_box_style), }; } @@ -2383,6 +2391,7 @@ fn widget_type_config_variable(widget_type: WidgetType) *ConfigWidgetStyle { .pane_left => &config_.pane_left_style, .pane_right => &config_.pane_right_style, .hint_window => &config_.hint_window_style, + .info_box => &config_.info_box_style, }; }