Skip to content

Rework nozzle section: equal frames, width-aware AMS paging, tooltips and click-to-highlight#11231

Open
tompollok wants to merge 4 commits into
bambulab:masterfrom
tompollok:feature/rework-nozzle-section
Open

Rework nozzle section: equal frames, width-aware AMS paging, tooltips and click-to-highlight#11231
tompollok wants to merge 4 commits into
bambulab:masterfrom
tompollok:feature/rework-nozzle-section

Conversation

@tompollok

@tompollok tompollok commented Jun 21, 2026

Copy link
Copy Markdown

Summary

Improves the Left/Right Nozzle AMS preview in the sidebar (a follow-up to #11221, which this stacks on top of).

  • Equal-width nozzle frames — both nozzle frames now resize symmetrically; works around a macOS wxStaticBoxSizer minimum-width quirk that made one side collapse earlier than the other.
  • Width-aware AMS paging — AMS icons are packed by their real pixel widths and the overflow is paged, so the visible count grows/shrinks smoothly with the panel width and the paging button only appears when an AMS genuinely doesn't fit. Per-nozzle capacity raised to 24 previews (covers 4 AMS/AMS2-Pro + 8 AMS-HT).
  • AMS tooltips — hovering an AMS shows its name and each loaded slot's filament with the readable Bambu colour name (via FilamentColorCodeQuery), falling back to the nearest colour name.
  • Click-to-highlight — clicking an AMS preview highlights the matching project filament(s) and scrolls the filament list so they're all visible. Matching uses the authoritative 1:1 tray assignment (not loose colour matching) and is gated on the synced FROM_AMS flag, so unsynced filaments and same-coloured filaments from other AMS units aren't caught.

Videos

Improved resizing. Now displays more AMS when the sidebar is extended and automatically adjust when resized less wide.
Video:
https://github.com/user-attachments/assets/3fa3a194-05c0-40d5-82f4-2cb5db3b5957

Tooltip information and highlight filament on click. It helps the user to faster and better understand what filaments are assigned where. Especially when you have multiple AMS it is very helpful without forcing the user to go to the "Device" Tab to check what color is allocated where.

Video:
https://github.com/user-attachments/assets/29c1b362-3308-47d0-acd7-680bde8c5076

Notes

Testing

Built and run on macOS (arm64) against a connected H2C: synced AMS, verified equal frames, paging while resizing the sidebar, colour-name tooltips, and click-to-highlight + scroll for AMS/AMS2-Pro and AMS-HT units.

🤖 Generated with Claude Code

Thomas Pollok and others added 4 commits June 19, 2026 23:29
Make the filament selection UIs show the filament display name and, on
dual-nozzle printers (e.g. H2D/H2C), a right-aligned (L)/(R) nozzle side:

- Object list "Fila." column and its dropdown editor.
- "Change Filament" / "Change filament" context menus.
- Support/raft base and Support/raft interface selectors.

To make the nozzle side correct, write the real per-filament nozzle into
filament_map during AMS sync (both overwrite and merge paths), derived
from each AMS's bound extruder / current filament-switcher position the
same way the Left/Right Nozzle view does. Empty external-spool slots are
skipped so they no longer add phantom filaments.

Also:
- Add an opt-in right-aligned text column to the DropDown widget so the
  (L)/(R) labels line up vertically.
- Object-tree filament cell tooltip shows the readable color name and the
  AMS location (e.g. "Black - AMS HT-B").

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Make get_color_display_name() and build_filament_ams_locations()
externally linkable (drop static, declare in the header) so the AMS
preview in the sidebar can reuse them for tooltips and for mapping a
clicked AMS to its project filaments.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add PlaterPresetComboBox::FlashHighlight()/ClearHighlight(): briefly
outline the combo in green via a self-restoring timer, and cancel an
active highlight on demand. Used to draw attention to the project
filament(s) that belong to a clicked AMS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…highlight

Improve the Left/Right Nozzle AMS preview in the sidebar:

- Give both nozzle frames equal width and stop the macOS static-box from
  forcing an oversized minimum, so they resize symmetrically.
- Pack AMS icons by their real pixel widths and page the overflow, so the
  visible count tracks the panel width smoothly and the paging button only
  appears when an AMS genuinely does not fit. Raise the per-nozzle capacity
  to 24 previews (4 AMS/AMS2-Pro + 8 AMS-HT).
- Add a tooltip per AMS showing its name and each loaded slot's filament
  with the readable Bambu colour name (FilamentColorCodeQuery), falling
  back to the nearest colour name.
- Click an AMS preview to highlight the matching project filament(s),
  using the 1:1 tray assignment (not loose colour matching) and gated on
  the synced FROM_AMS flag, then scroll the filament list so they are all
  visible.

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

1 participant