fix: resolve text truncation in MixedFilamentDialog across multiple DPIs#348
Open
PILIPALA030 wants to merge 4 commits into
Open
Conversation
- Move "Filament Selection" title to its own row so it no longer competes with buttons for horizontal space at high DPI - Replace wxStaticText with Label + LB_AUTO_WRAP for error/warning banners, wrapping to actual allocated width instead of hardcoded FromDIP(360) which exceeded available space by 12+ DIP - Add width > 0 guard in Label::SetLabel to prevent one-char-per-line flicker when SetLabel is called before sizer layout
…m' into fix/text-truncation-multi-dpi # Conflicts: # src/slic3r/GUI/MixedFilamentDialog.cpp
…update header types - Label constructor: add width > 0 guard before Wrap() to match SetLabel fix - on_dpi_changed: restore Fit() (removed accidentally), dropped only the redundant Layout() which DPIAware::rescale() already calls - MixedFilamentDialog.hpp: declare m_error_text/m_warning_text as Label* with forward declaration instead of wxStaticText*
…i_changed - Label::SetLabel: when GetSize().x is 0 and LB_AUTO_WRAP is set, fall through to wxStaticText::SetLabel instead of silently skipping the display update - MixedFilamentDialog::on_dpi_changed: restore Layout() call removed earlier, keeping consistency with all other DPIDialog subclasses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary
clipped at different display resolutions (2K, 3072x1920)
Root Cause
Three interacting issues:
the total width exceeded the card's FromDIP(325) constraint
the actual available width of ~334 DIP
Changes
Title moved to independent row with wxEXPAND; error/warning text
switched from wxStaticText to Label with LB_AUTO_WRAP; 7 explicit
Wrap(FromDIP(360)) calls removed; added 8 DIP spacer between title
and button row
Added width > 0 guard in SetLabel to prevent wrapping to zero-width
before sizer layout completes
Test Plan