Problem
When a Toggle is in the ON (active) state and the user hovers over it, the pill color briefly flashes gray instead of staying blue. This makes the toggle appear broken on hover.
Root Cause
Makepad's Toggle pixel shader in widgets2/src/check_box.rs has an incorrect mix chain order:
// color_fill: active → hover (hover overrides active — BUG)
.mix(self.color_active, self.active)
.mix(self.color_hover, self.hover) // ← overwrites active color
// mark_color: hover → active (active overrides hover — CORRECT)
.mix(self.mark_color_hover, self.hover)
.mix(self.mark_color_active, self.active)
The color_fill and color_stroke chains have hover after active, causing hover to unconditionally override the active state color. Meanwhile mark_color correctly has active after hover.
Fix
Swap the hover and active lines in color_fill and color_stroke mix chains to match mark_color order.
Upstream PR
PR submitted to makepad/makepad (link TBD).
Affected Robrix UI
- Settings → Labs → App Service toggle
- Settings → Labs → Translation toggle
Problem
When a Toggle is in the ON (active) state and the user hovers over it, the pill color briefly flashes gray instead of staying blue. This makes the toggle appear broken on hover.
Root Cause
Makepad's Toggle pixel shader in
widgets2/src/check_box.rshas an incorrect mix chain order:The
color_fillandcolor_strokechains havehoverafteractive, causing hover to unconditionally override the active state color. Meanwhilemark_colorcorrectly hasactiveafterhover.Fix
Swap the
hoverandactivelines incolor_fillandcolor_strokemix chains to matchmark_colororder.Upstream PR
PR submitted to makepad/makepad (link TBD).
Affected Robrix UI