feat: add style switching command to palette (alt+f9)
This commit is contained in:
		
							parent
							
								
									af9b097077
								
							
						
					
					
						commit
						c67c0b0c94
					
				
					 2 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
					@ -285,6 +285,7 @@
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "overlay/palette": {
 | 
					    "overlay/palette": {
 | 
				
			||||||
        "press": [
 | 
					        "press": [
 | 
				
			||||||
 | 
					            ["alt+f9", "overlay_next_widget_style"],
 | 
				
			||||||
            ["alt+!", "add_task"],
 | 
					            ["alt+!", "add_task"],
 | 
				
			||||||
            ["ctrl+j", "toggle_panel"],
 | 
					            ["ctrl+j", "toggle_panel"],
 | 
				
			||||||
            ["ctrl+q", "quit"],
 | 
					            ["ctrl+q", "quit"],
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -532,6 +532,14 @@ pub fn Create(options: type) type {
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            pub const overlay_toggle_inputview_meta: Meta = .{};
 | 
					            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 {
 | 
					            pub fn mini_mode_paste(self: *Self, ctx: Ctx) Result {
 | 
				
			||||||
                return overlay_insert_bytes(self, ctx);
 | 
					                return overlay_insert_bytes(self, ctx);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue