refactor: remove unused parameter in set_base_style
This commit is contained in:
parent
0a43fa853f
commit
cfb9f8cf11
25 changed files with 28 additions and 28 deletions
|
@ -35,7 +35,7 @@ pub fn layout(self: *Self) Widget.Layout {
|
|||
}
|
||||
|
||||
pub fn render(self: *Self, theme: *const Widget.Theme) bool {
|
||||
self.plane.set_base_style(" ", theme.statusbar);
|
||||
self.plane.set_base_style(theme.statusbar);
|
||||
self.plane.erase();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ pub fn layout(_: *Self) Widget.Layout {
|
|||
}
|
||||
|
||||
pub fn render(self: *Self, theme: *const Widget.Theme) bool {
|
||||
self.plane.set_base_style(" ", theme.statusbar);
|
||||
self.plane.set_base_style(theme.statusbar);
|
||||
self.plane.erase();
|
||||
self.plane.home();
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ pub fn layout(self: *Self, _: *Button.State(Self)) Widget.Layout {
|
|||
|
||||
pub fn render(self: *Self, btn: *Button.State(Self), theme: *const Widget.Theme) bool {
|
||||
const bg_style = if (btn.active) theme.editor_cursor else if (btn.hover) theme.statusbar_hover else theme.statusbar;
|
||||
btn.plane.set_base_style(" ", bg_style);
|
||||
btn.plane.set_base_style(bg_style);
|
||||
btn.plane.erase();
|
||||
btn.plane.home();
|
||||
_ = btn.plane.putstr(self.rendered) catch {};
|
||||
|
|
|
@ -78,7 +78,7 @@ pub fn layout(_: *Self, _: *Button.State(Self)) Widget.Layout {
|
|||
pub fn render(self: *Self, btn: *Button.State(Self), theme: *const Widget.Theme) bool {
|
||||
const frame = tracy.initZone(@src(), .{ .name = @typeName(@This()) ++ " render" });
|
||||
defer frame.deinit();
|
||||
btn.plane.set_base_style(" ", if (btn.active) theme.editor_cursor else theme.statusbar);
|
||||
btn.plane.set_base_style(if (btn.active) theme.editor_cursor else theme.statusbar);
|
||||
btn.plane.erase();
|
||||
btn.plane.home();
|
||||
if (tui.current().mini_mode) |_|
|
||||
|
|
|
@ -93,7 +93,7 @@ fn render_idle(self: *Self) bool {
|
|||
pub fn render(self: *Self, theme: *const Widget.Theme) bool {
|
||||
const frame = tracy.initZone(@src(), .{ .name = @typeName(@This()) ++ " render" });
|
||||
defer frame.deinit();
|
||||
self.plane.set_base_style(" ", if (self.hover) theme.statusbar_hover else theme.statusbar);
|
||||
self.plane.set_base_style(if (self.hover) theme.statusbar_hover else theme.statusbar);
|
||||
self.frame += 1;
|
||||
if (self.frame - self.key_active_frame > self.wipe_after_frames)
|
||||
self.unset_key_all();
|
||||
|
|
|
@ -41,7 +41,7 @@ pub fn layout(self: *Self, btn: *Button.State(Self)) Widget.Layout {
|
|||
}
|
||||
|
||||
pub fn render(self: *Self, btn: *Button.State(Self), theme: *const Widget.Theme) bool {
|
||||
btn.plane.set_base_style(" ", if (btn.active) theme.editor_cursor else if (btn.hover) theme.statusbar_hover else theme.statusbar);
|
||||
btn.plane.set_base_style(if (btn.active) theme.editor_cursor else if (btn.hover) theme.statusbar_hover else theme.statusbar);
|
||||
btn.plane.erase();
|
||||
btn.plane.home();
|
||||
_ = btn.plane.putstr(self.rendered) catch {};
|
||||
|
|
|
@ -69,7 +69,7 @@ pub fn render(self: *Self, theme: *const Widget.Theme) bool {
|
|||
const style_normal = theme.statusbar;
|
||||
const style_info: Widget.Theme.Style = .{ .fg = theme.statusbar.fg, .fs = theme.editor_information.fs };
|
||||
const style_error: Widget.Theme.Style = .{ .fg = theme.editor_error.fg, .fs = theme.editor_error.fs };
|
||||
self.plane.set_base_style(" ", style_normal);
|
||||
self.plane.set_base_style(style_normal);
|
||||
self.plane.erase();
|
||||
self.plane.home();
|
||||
self.plane.set_style(if (self.level == .err) style_error else style_info);
|
||||
|
|
|
@ -42,7 +42,7 @@ fn is_overlay_mode() bool {
|
|||
|
||||
pub fn render(_: *void, self: *Button.State(void), theme: *const Widget.Theme) bool {
|
||||
const base_style = if (self.active) theme.editor_cursor else if (self.hover) theme.editor_selection else theme.statusbar_hover;
|
||||
self.plane.set_base_style(" ", base_style);
|
||||
self.plane.set_base_style(base_style);
|
||||
self.plane.on_styles(style.bold);
|
||||
self.plane.erase();
|
||||
self.plane.home();
|
||||
|
@ -52,7 +52,7 @@ pub fn render(_: *void, self: *Button.State(void), theme: *const Widget.Theme) b
|
|||
} else {
|
||||
_ = self.plane.putstr(" ") catch {};
|
||||
}
|
||||
self.plane.set_base_style(" ", base_style);
|
||||
self.plane.set_base_style(base_style);
|
||||
self.plane.on_styles(style.bold);
|
||||
_ = self.plane.putstr(std.fmt.bufPrintZ(&buf, "{s} ", .{tui.get_mode()}) catch return false) catch {};
|
||||
if (is_mini_mode())
|
||||
|
|
|
@ -49,7 +49,7 @@ pub fn layout(_: *Self) Widget.Layout {
|
|||
pub fn render(self: *Self, theme: *const Widget.Theme) bool {
|
||||
const frame = tracy.initZone(@src(), .{ .name = @typeName(@This()) ++ " render" });
|
||||
defer frame.deinit();
|
||||
self.plane.set_base_style(" ", if (self.hover) theme.statusbar_hover else theme.statusbar);
|
||||
self.plane.set_base_style(if (self.hover) theme.statusbar_hover else theme.statusbar);
|
||||
self.plane.erase();
|
||||
self.plane.home();
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ pub fn layout(self: *Self) Widget.Layout {
|
|||
pub fn render(self: *Self, theme: *const Widget.Theme) bool {
|
||||
const frame = tracy.initZone(@src(), .{ .name = @typeName(@This()) ++ " render" });
|
||||
defer frame.deinit();
|
||||
self.plane.set_base_style(" ", theme.statusbar);
|
||||
self.plane.set_base_style(theme.statusbar);
|
||||
self.plane.erase();
|
||||
self.plane.home();
|
||||
_ = self.plane.putstr(self.rendered) catch {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue