feat: add hint_window widget type
This commit is contained in:
parent
4658c4820f
commit
e4dba00625
3 changed files with 5 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ home_style: WidgetStyle = .bars_top_bottom,
|
||||||
pane_left_style: WidgetStyle = .bar_right,
|
pane_left_style: WidgetStyle = .bar_right,
|
||||||
pane_right_style: WidgetStyle = .bar_left,
|
pane_right_style: WidgetStyle = .bar_left,
|
||||||
pane_style: PaneStyle = .panel,
|
pane_style: PaneStyle = .panel,
|
||||||
|
hint_window_style: WidgetStyle = .thick_boxed,
|
||||||
|
|
||||||
centered_view: bool = false,
|
centered_view: bool = false,
|
||||||
centered_view_width: usize = 145,
|
centered_view_width: usize = 145,
|
||||||
|
|
@ -90,6 +91,7 @@ pub const WidgetType = enum {
|
||||||
home,
|
home,
|
||||||
pane_left,
|
pane_left,
|
||||||
pane_right,
|
pane_right,
|
||||||
|
hint_window,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const WidgetStyle = enum {
|
pub const WidgetStyle = enum {
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,7 @@ pub fn theme_style_from_type(style_type: WidgetType, theme: *const Theme) Theme.
|
||||||
.panel => .{ .fg = theme.editor_widget.bg, .bg = theme.panel.bg },
|
.panel => .{ .fg = theme.editor_widget.bg, .bg = theme.panel.bg },
|
||||||
.editor => .{ .fg = theme.editor_widget.bg, .bg = theme.editor.bg },
|
.editor => .{ .fg = theme.editor_widget.bg, .bg = theme.editor.bg },
|
||||||
},
|
},
|
||||||
|
.hint_window => .{ .fg = theme.editor_widget_border.fg, .bg = theme.editor_widget.bg },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2046,6 +2046,7 @@ pub fn get_widget_style(widget_type: WidgetType) *const WidgetStyle {
|
||||||
.home => WidgetStyle.from_tag(config_.home_style),
|
.home => WidgetStyle.from_tag(config_.home_style),
|
||||||
.pane_left => WidgetStyle.from_tag(config_.pane_left_style),
|
.pane_left => WidgetStyle.from_tag(config_.pane_left_style),
|
||||||
.pane_right => WidgetStyle.from_tag(config_.pane_right_style),
|
.pane_right => WidgetStyle.from_tag(config_.pane_right_style),
|
||||||
|
.hint_window => WidgetStyle.from_tag(config_.hint_window_style),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2071,6 +2072,7 @@ fn widget_type_config_variable(widget_type: WidgetType) *ConfigWidgetStyle {
|
||||||
.home => &config_.home_style,
|
.home => &config_.home_style,
|
||||||
.pane_left => &config_.pane_left_style,
|
.pane_left => &config_.pane_left_style,
|
||||||
.pane_right => &config_.pane_right_style,
|
.pane_right => &config_.pane_right_style,
|
||||||
|
.hint_window => &config_.hint_window_style,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue