fix: some minor alpha rendering issues

This commit is contained in:
CJ van den Berg 2024-11-05 10:46:06 +01:00
parent cbcf8cc2dd
commit 486c6ba95e
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 18 additions and 9 deletions

View file

@ -41,17 +41,15 @@ fn is_overlay_mode() bool {
}
pub fn render(_: *void, self: *Button.State(void), theme: *const Widget.Theme) bool {
const style_base = theme.statusbar_hover;
const style_label = if (self.active) theme.editor_cursor else if (self.hover) theme.editor_selection else style_base;
const style_base = theme.statusbar;
const style_label = if (self.active) theme.editor_cursor else if (self.hover) theme.editor_selection else theme.statusbar_hover;
self.plane.set_base_style(style_base);
self.plane.on_styles(style.bold);
self.plane.erase();
self.plane.home();
self.plane.set_style(style_label);
if (self.active or self.hover) {
_ = self.plane.fill_width(" ", .{}) catch {};
self.plane.home();
}
_ = self.plane.fill_width(" ", .{}) catch {};
self.plane.home();
self.plane.on_styles(style.bold);
var buf: [31:0]u8 = undefined;
if (!is_mini_mode() and !is_overlay_mode()) {
render_logo(self, theme, style_label);