feat: add option to disable modal dim effect
For some terminal themes is cooler to not dim the screen when palettes are showing.
This commit is contained in:
parent
85c3e7ae7c
commit
395dadf6e3
2 changed files with 2 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ gutter_line_numbers_style: DigitStyle = .ascii,
|
||||||
gutter_symbols: bool = true,
|
gutter_symbols: bool = true,
|
||||||
enable_terminal_cursor: bool = true,
|
enable_terminal_cursor: bool = true,
|
||||||
enable_terminal_color_scheme: bool = false,
|
enable_terminal_color_scheme: bool = false,
|
||||||
|
enable_modal_dim: bool = true,
|
||||||
highlight_current_line: bool = true,
|
highlight_current_line: bool = true,
|
||||||
highlight_current_line_gutter: bool = true,
|
highlight_current_line_gutter: bool = true,
|
||||||
highlight_columns: []const u16 = &.{ 80, 100, 120 },
|
highlight_columns: []const u16 = &.{ 80, 100, 120 },
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ pub fn State(ctx_type: type) type {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn render(self: *Self, theme: *const Widget.Theme) bool {
|
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);
|
return self.opts.on_render(self.opts.ctx, self, theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue