Skip to content

Fix dropdown text clipping in non-Chinese locales#141

Merged
Jack251970 merged 1 commit into
Jack251970:masterfrom
KamilDev:combobox-min-width
Apr 23, 2026
Merged

Fix dropdown text clipping in non-Chinese locales#141
Jack251970 merged 1 commit into
Jack251970:masterfrom
KamilDev:combobox-min-width

Conversation

@KamilDev
Copy link
Copy Markdown

Summary

  • Two ComboBoxes (SwitchDicList and ShellList's Win11/Win10 menu-style toggle) were created with a fixed Width in pixels, sized for short Chinese strings. Longer translations like de-DE "Win10 Klassischer Rechtsklick-Menüstil", pt-BR "Estilo clássico de menu de contexto do Win10", de-DE "Internet-Wörterbuch", and tr-TR "Kullanıcı Sözlükleri" overflowed, and the selection text was clipped.
  • Replaces Width with MinWidth so WPF auto-measures each ComboBox to its widest item. The parent MyListItem puts controls in a GridLength.Auto column, so the row grows without breaking the title layout. Same pattern is already used in LanguagesView, SelectDialog, and BackupDialog.
  • Audited every other ComboBox / dropdown in the codebase: all already use MinWidth (or live in star-sized grid cells). Other Width = N matches are NumberBox numeric inputs and icon hosts, not text-bearing dropdowns.

Two ComboBoxes pinned a fixed pixel Width sized for short Chinese strings.
Longer translations (e.g. de-DE "Win10 Klassischer Rechtsklick-Menüstil",
pt-BR "Estilo clássico de menu de contexto do Win10", de-DE
"Internet-Wörterbuch", tr-TR "Kullanıcı Sözlükleri") overflowed and the
selection text was clipped.

Switch Width to MinWidth so WPF auto-grows the ComboBox to its widest
item. The parent MyListItem places controls in a GridLength.Auto column,
so the row absorbs the extra width without breaking the title layout.
This matches the pattern already used elsewhere (LanguagesView,
SelectDialog, BackupDialog).
@Jack251970 Jack251970 added the bug Something isn't working label Apr 23, 2026
Copy link
Copy Markdown
Owner

@Jack251970 Jack251970 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@Jack251970 Jack251970 merged commit d1b04fc into Jack251970:master Apr 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants