Skip to content

Footswitch rewrite (more vertical space, bugfixes)#178

Open
sastraxi wants to merge 16 commits into
TreeFallSound:pistomp-v3from
sastraxi:feat/simple-footswitch-ui
Open

Footswitch rewrite (more vertical space, bugfixes)#178
sastraxi wants to merge 16 commits into
TreeFallSound:pistomp-v3from
sastraxi:feat/simple-footswitch-ui

Conversation

@sastraxi

@sastraxi sastraxi commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Reworks the LCD footswitch strip (on v3) so it is more compact, stays in sync with MOD-UI, and behaves consistently whether it is bound to a bypass or to an arbitrary parameter.

Happy to extract out the correctness fixes without the UI change, too.

Preview

initial
  • A/B: bound to bypass. A is on, B is bypassed.
  • C/D: bound to nothing. C is on, D is off. Source of truth: pi-Stomp.

What changed

  1. The old widget drew two ellipses and a label, which looked like a footswitch but took up too much space. The new FootswitchWidget renders a compact keycap outline around a centered label. Color is used as an accent: the configured plugin color when the switch is on, and a dimmed gray when it is off. Long labels are hard-truncated to the slot width so they never overflow into a neighboring switch.
  2. A footswitch bound to a parameter other than :bypass now derives its on/off state directly from the parameter value, without the bypass inversion. This means toggle parameters like a "Solo" switch light up exactly when MOD-UI says they are on, rather than silently staying constant.
  3. Plugin.set_param_value is introduced as the single path for updating a parameter's cached value and pushing that value to every control bound to it. Mod now routes both param_set and connect-dump updates through this helper, so bound footswitches (and future controls) stay in sync without duplicating the update logic.
  4. ShroudedPanel gives modal overlays a translucent dark backing that dims whatever is underneath, without requiring the underlying panel to redraw. It integrates with PanelStack so non-input panels can be shown without stealing focus.

sastraxi and others added 16 commits May 29, 2026 01:50
# Conflicts:
#	tests/snapshots/test_lcd320x240/test_system_menu_snapshot/0.png
#	tests/snapshots/v3/test_startup/test_v3_nav_to_system_menu/0.png
#	uilib/config.py
Replace the full-width top accent bar with a keycap outline (rounded top
corners, open bottom) hugging the centered label. Add ShroudedPanel and
apply a translucent dark overlay to the bottom footswitch panel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts:
#	pistomp/lcd320x240.py
#	tests/snapshots/test_lcd320x240/test_system_menu_snapshot/0.png
#	tests/snapshots/v3/test_startup/test_v3_nav_to_system_menu/0.png
Erase the previously drawn keycap on single-widget refresh so a narrower
label no longer leaves ghost pixels from a wider one, giving a consistent
black backdrop. Track the keycap footprint slot-relative so the erase never
touches a neighbouring switch.

Make drives_display true for non-:bypass param bindings: only :bypass gets a
WS bypass-echo redraw, so footswitches bound to other params (e.g. mixer Solo)
must update their own LED/LCD on press.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Hard-cut over-long footswitch labels so the padded keycap never exceeds its
slot width, mirroring how plugin labels are truncated. Measures with the
actual keycap font, so it covers every label source (bypass, non-bypass,
unbound, live update).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant