feat: make indent size and tab width configurable and add indent guide mode
This commit is contained in:
parent
55fb6d29a0
commit
d2238bf847
15 changed files with 363 additions and 323 deletions
|
@ -35,7 +35,7 @@ fn on_click(_: *Self, _: *Button.State(Self)) void {
|
|||
}
|
||||
|
||||
pub fn layout(self: *Self, btn: *Button.State(Self)) Widget.Layout {
|
||||
const len = btn.plane.egc_chunk_width(self.rendered, 0);
|
||||
const len = btn.plane.egc_chunk_width(self.rendered, 0, 1);
|
||||
return .{ .static = len };
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ pub fn create(allocator: Allocator, parent: Plane, event_handler: ?Widget.EventH
|
|||
}
|
||||
|
||||
pub fn layout(_: *void, btn: *Button.State(void)) Widget.Layout {
|
||||
const name = btn.plane.egc_chunk_width(tui.get_mode(), 0);
|
||||
const logo = if (is_mini_mode() or is_overlay_mode()) 1 else btn.plane.egc_chunk_width(left ++ symbol ++ right, 0);
|
||||
const name = btn.plane.egc_chunk_width(tui.get_mode(), 0, 1);
|
||||
const logo = if (is_mini_mode() or is_overlay_mode()) 1 else btn.plane.egc_chunk_width(left ++ symbol ++ right, 0, 1);
|
||||
const padding: usize = 2;
|
||||
const minimode_sep: usize = if (is_mini_mode()) 1 else 0;
|
||||
return .{ .static = logo + name + padding + minimode_sep };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue