fix: alpha rendering of status bar

This commit is contained in:
CJ van den Berg 2024-12-12 18:46:57 +01:00
parent 76ad218729
commit 62a4ec1400
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
11 changed files with 44 additions and 11 deletions

View file

@ -78,9 +78,12 @@ pub fn layout(_: *Self, _: *Button.State(Self)) Widget.Layout {
pub fn render(self: *Self, btn: *Button.State(Self), theme: *const Widget.Theme) bool {
const style_base = theme.statusbar;
const style_label = if (btn.active) theme.editor_cursor else style_base;
btn.plane.set_base_style(style_base);
btn.plane.set_base_style(theme.editor);
btn.plane.erase();
btn.plane.home();
btn.plane.set_style(style_base);
_ = btn.plane.fill_width(" ", .{}) catch {};
btn.plane.home();
btn.plane.set_style(style_label);
if (btn.active) {
_ = btn.plane.fill_width(" ", .{}) catch {};