feat: make the statusbar gripper a litte more subtle by moving it to the left edge
This commit is contained in:
parent
4b6c08154b
commit
3dd9efa66e
1 changed files with 10 additions and 4 deletions
|
@ -24,10 +24,16 @@ pub fn create(a: std.mem.Allocator, parent: Widget, event_handler: ?Widget.Event
|
||||||
fn render_grip(ctx: ?*anyopaque, theme: *const Widget.Theme) void {
|
fn render_grip(ctx: ?*anyopaque, theme: *const Widget.Theme) void {
|
||||||
const w: *WidgetList = @ptrCast(@alignCast(ctx.?));
|
const w: *WidgetList = @ptrCast(@alignCast(ctx.?));
|
||||||
if (w.hover()) {
|
if (w.hover()) {
|
||||||
w.plane.set_style(theme.statusbar_hover);
|
const w0 = &w.widgets.items[0].widget;
|
||||||
const width = w.plane.dim_x();
|
const style = if (tui.current().config.modestate_show)
|
||||||
const grip_pos = width / 2;
|
if (w0.hover())
|
||||||
w.plane.cursor_move_yx(0, @intCast(grip_pos)) catch {};
|
theme.editor_selection
|
||||||
|
else
|
||||||
|
theme.statusbar_hover
|
||||||
|
else
|
||||||
|
theme.statusbar_hover;
|
||||||
|
w.plane.set_style(style);
|
||||||
|
w.plane.cursor_move_yx(0, 0) catch {};
|
||||||
_ = w.plane.putstr(" ") catch {};
|
_ = w.plane.putstr(" ") catch {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue