Skip to content

Commit

Permalink
Fix a number of small issues with the SUI (#12287)
Browse files Browse the repository at this point in the history
## Summary of the Pull Request
Fix various things from the recent SUI changes

- The Appearance/Advanced toggle buttons now have a max width
- We don't need `Profiles.cpp` anymore
- The `Elevate` setting is now back in the SUI
- There is no longer an alignment difference between non-expander settings and expander settings
- Expander settings no longer require hitting `Tab` twice to get to them

<!-- Please review the items on the PR checklist before submitting-->
## 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
  • Loading branch information
PankajBhojwani committed Jan 31, 2022
1 parent 2861b41 commit a1ce81b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 28 deletions.
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsEditor/CommonResources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@
TargetType="ToggleButton">
<Setter Property="Background" Value="{ThemeResource ExpanderHeaderBackground}" />
<Setter Property="MinWidth" Value="{ThemeResource FlyoutThemeMinWidth}" />
<Setter Property="MaxWidth" Value="1000" />
<Setter Property="MinHeight" Value="64" />
<Setter Property="BorderThickness" Value="{ThemeResource ExpanderHeaderBorderThickness}" />
<Setter Property="BorderBrush" Value="{ThemeResource ExpanderHeaderBorderBrush}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,6 @@
<DependentUpon>MainPage.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
<ClCompile Include="Profiles.cpp">
<DependentUpon>Profiles.idl</DependentUpon>
<SubType>Code</SubType>
</ClCompile>
<ClCompile Include="ProfileViewModel.cpp">
<DependentUpon>ProfileViewModel.idl</DependentUpon>
<SubType>Code</SubType>
Expand Down
23 changes: 0 additions & 23 deletions src/cascadia/TerminalSettingsEditor/Profiles.cpp

This file was deleted.

9 changes: 9 additions & 0 deletions src/cascadia/TerminalSettingsEditor/Profiles_Base.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@
Text="{x:Bind Profile.TabTitle, Mode=TwoWay}" />
</local:SettingContainer>

<!-- Elevate -->
<local:SettingContainer x:Uid="Profile_Elevate"
ClearSettingValue="{x:Bind Profile.ClearElevate}"
HasSettingValue="{x:Bind Profile.HasElevate, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.ElevateOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind Profile.Elevate, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>

<!-- Hidden -->
<local:SettingContainer x:Uid="Profile_Hidden"
Visibility="{x:Bind local:Converters.InvertedBooleanToVisibility(Profile.IsBaseLayer), Mode=OneWay}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
</Style>

<Style TargetType="local:SettingContainer">
<Setter Property="Margin" Value="0,4,8,0" />
<Setter Property="Margin" Value="0,4,0,0" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="MaxWidth" Value="1000" />
<Setter Property="Template">
Expand Down Expand Up @@ -138,6 +138,7 @@
<Style x:Key="ExpanderSettingContainerStyle"
TargetType="local:SettingContainer">
<Setter Property="MaxWidth" Value="1000" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:SettingContainer">
Expand Down

0 comments on commit a1ce81b

Please sign in to comment.