winutil icon indicating copy to clipboard operation
winutil copied to clipboard

DNS dropdown text looks cramped - global ToggleButton style leaks into the ComboBox template

Open YayoRazo opened this issue 4 months ago • 0 comments

Problem

In the Config tab, the "DNS - Set to:" dropdown (WPFchangedns, config/tweaks.json:1835) shows its selected text ("Default") visually cramped/clipped against the box edges instead of having normal padding.

Cause (best guess, not yet confirmed live)

xaml/inputXML.xaml:325 declares an implicit, unscoped <Style TargetType="{x:Type ToggleButton}"> (no x:Key) meant for the big top-bar tab buttons. Because it has no key, WPF applies it to every ToggleButton in the visual tree - including the internal ToggleButton template part inside every ComboBox (the ComboBox's own style builds one at xaml/inputXML.xaml:264, wrapping a text/arrow Grid with TextBlock Margin="6,3,2,3"). The implicit tab-button style overrides that template's part with extra chrome (ButtonGlow/BackgroundBorder borders plus a ContentPresenter Margin="10,2,10,2") sized for a full tab button, not a 25px-tall combo box, stacking margins/borders that squeeze the visible text area down.

Suggested fix direction

Scope the tab-button style with an x:Key (or add an explicit override on the ComboBox's internal ToggleButton part) so it stops leaking into other controls' templates.

Note

Traced via static XAML analysis, not a live run - flagging as an issue rather than opening a PR for a fix I haven't independently verified.

YayoRazo avatar Jul 13 '26 03:07 YayoRazo