fix: reset transparent styles to avoid zebra effect on home screen

This commit is contained in:
CJ van den Berg 2024-08-08 15:22:21 +02:00
parent 9b00805546
commit bc386b21f0

View file

@ -157,6 +157,7 @@ pub fn render(self: *Self, theme: *const Widget.Theme) bool {
self.plane.set_style_bg_transparent(style_subtext); self.plane.set_style_bg_transparent(style_subtext);
self.plane.cursor_move_yx(7, 6) catch return false; self.plane.cursor_move_yx(7, 6) catch return false;
_ = self.plane.print(subtext, .{}) catch {}; _ = self.plane.print(subtext, .{}) catch {};
self.plane.set_style(theme.editor);
self.menu.resize(.{ .y = 9, .x = 8, .w = 32 }); self.menu.resize(.{ .y = 9, .x = 8, .w = 32 });
} else { } else {
@ -167,6 +168,7 @@ pub fn render(self: *Self, theme: *const Widget.Theme) bool {
self.plane.set_style_bg_transparent(style_subtext); self.plane.set_style_bg_transparent(style_subtext);
self.plane.cursor_move_yx(3, 6) catch return false; self.plane.cursor_move_yx(3, 6) catch return false;
_ = self.plane.print(subtext, .{}) catch {}; _ = self.plane.print(subtext, .{}) catch {};
self.plane.set_style(theme.editor);
const x = @min(self.plane.dim_x() -| 32, 8); const x = @min(self.plane.dim_x() -| 32, 8);
self.menu.resize(.{ .y = 5, .x = x, .w = 32 }); self.menu.resize(.{ .y = 5, .x = x, .w = 32 });