feat: add style switching command to palette (alt+f9)

This commit is contained in:
CJ van den Berg 2025-08-13 22:35:58 +02:00
parent af9b097077
commit c67c0b0c94
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 9 additions and 0 deletions

View file

@ -285,6 +285,7 @@
},
"overlay/palette": {
"press": [
["alt+f9", "overlay_next_widget_style"],
["alt+!", "add_task"],
["ctrl+j", "toggle_panel"],
["ctrl+q", "quit"],

View file

@ -532,6 +532,14 @@ pub fn Create(options: type) type {
}
pub const overlay_toggle_inputview_meta: Meta = .{};
pub fn overlay_next_widget_style(self: *Self, _: Ctx) Result {
Widget.Style.set_next_style(widget_style_type);
const padding = Widget.Style.from_type(widget_style_type).padding;
self.do_resize(padding);
tui.need_render();
}
pub const overlay_next_widget_style_meta: Meta = .{};
pub fn mini_mode_paste(self: *Self, ctx: Ctx) Result {
return overlay_insert_bytes(self, ctx);
}