Skip to content

Commit

Permalink
Fix toggle switches needing a negative margin (#12381)
Browse files Browse the repository at this point in the history
## Summary of the Pull Request
Reducing the `MinWidth` of a toggle switch means it no longer needs a negative margin to align it correctly

## PR Checklist
* [ ] Closes #xxx
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [x] I work here

## Validation Steps Performed
Setting a different language no longer causes the toggle switch to fall out of the expander

(cherry picked from commit 64efa67)
  • Loading branch information
PankajBhojwani authored and DHowett committed Feb 9, 2022
1 parent 93b5c38 commit 3adf80d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cascadia/TerminalSettingsEditor/CommonResources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
<Setter Property="MinWidth" Value="{StaticResource ToggleSwitchThemeMinWidth}" />
<Setter Property="FocusVisualMargin" Value="-7,-3,-7,-3" />
<Setter Property="Margin" Value="0,0,-80,0" />
<Setter Property="Margin" Value="0,0,10,0" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleSwitch">
Expand Down

0 comments on commit 3adf80d

Please sign in to comment.