Skip to content

fix(gui): dark-mode icons, layout shift and DPI rescale in mixed-filament batch dialog - #726

Merged
Kenshin627 merged 2 commits into
Snapmaker:fix_2.3.6_bugfrom
zhangzhend0ng:bugfix_mix_color_ui
Aug 18, 2026
Merged

fix(gui): dark-mode icons, layout shift and DPI rescale in mixed-filament batch dialog#726
Kenshin627 merged 2 commits into
Snapmaker:fix_2.3.6_bugfrom
zhangzhend0ng:bugfix_mix_color_ui

Conversation

@zhangzhend0ng

Copy link
Copy Markdown
Collaborator

Description

Follow-up UI fixes for the mixed-filament batch color-match dialog introduced in #702, plus the related sidebar button:

  • Dark-mode icons: added _light variants for the add/remove and tray-nav buttons and set explicit
    disabled-state bitmaps (muted opposite-palette asset), so enabled/disabled states are distinguishable
    in both light and dark themes.
  • macOS placeholder centering: center the preview placeholder by logical size (GetScaledSize) so
    Retina-rasterized bitmaps are no longer shifted toward the top-left; identity for scale-1.0 bitmaps,
    so Windows/Linux rendering is unchanged.
  • Layout stability: pinned title rows to 20 DIP, manual-card rows to 30 DIP (matching the recommended
    card), and add/remove buttons to 16x16 DIP, so cards no longer shift when switching between
    recommended and manual modes.
  • DPI rescale: the sidebar "Color Mixing Match" button now gets Rescale() in msw_rescale() and
    sys_color_changed(). Its cached text extent (messureSize) otherwise goes stale after a per-monitor
    DPI change or theme switch, making the label drift or clip.
  • zh_CN: refined the mix-ratio range warning translation.

No breaking changes, no new dependencies.

Tests

Manual verification (Windows 11):

  • Toggled light/dark theme — add/remove and tray-nav buttons show distinct enabled/disabled states in both themes
  • Switched Recommended ↔ Manual repeatedly — no card shift, title rows stay aligned
  • Moved the window between 100% and 150% monitors — sidebar button label and dialog placeholder stay centered, no clipping

- Center the preview placeholder by logical size (GetScaledSize) so the
  Retina-rasterized bitmap is no longer shifted toward the top-left on macOS
- Add _light icon variants for the add/remove and tray nav buttons, and set
  explicit disabled-state bitmaps (muted opposite-palette asset) so the four
  states are distinguishable in both themes
- Pin title rows to 20 DIP and manual-card rows to 30 DIP (matching the
  recommended card), and pin add/remove buttons to 16x16 DIP, so cards no
  longer shift when switching between recommended and manual modes
- Refine zh_CN translation of the mix-ratio range warning
Button::Rescale() refreshes icons, re-measures the cached text
extent (messureSize) and re-applies the style. It was missing for
m_btn_batch_match in Sidebar::msw_rescale() and sys_color_changed(),
so the label drifted/clipped after a DPI or theme change while the
sibling flushing-volume button stayed correct.
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.

2 participants