use statusbar.hover style for actual hovering

The style was used for regular display of the style_label instead, which
gives the current keymap/mode weird prominence, and which means that
actual (mouse) hovering needed to use the unrelated "selection" style.

This commit uses the hover style for just hovering, or if a mini mode is
used (which, to me, sounds at least plausible).

For modal-workflow users, it may be more helpful to actually highlight
the mode (sometimes?), but I have no experience with that.
This commit is contained in:
Ingo Lohmar 2025-03-08 19:20:46 +01:00 committed by CJ van den Berg
parent 0c98460ca8
commit d011294c69

View file

@ -43,7 +43,7 @@ fn is_overlay_mode() bool {
pub fn render(_: *void, self: *Button.State(void), theme: *const Widget.Theme) bool { pub fn render(_: *void, self: *Button.State(void), theme: *const Widget.Theme) bool {
const style_base = theme.statusbar; 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; const style_label = if (self.active) theme.editor_cursor else if (self.hover or is_mini_mode()) theme.statusbar_hover else style_base;
self.plane.set_base_style(theme.editor); self.plane.set_base_style(theme.editor);
self.plane.erase(); self.plane.erase();
self.plane.home(); self.plane.home();