This commit is contained in:
Niels Laute
2021-08-08 23:42:21 +02:00
parent adf07ff0c3
commit bc93a27e31
12 changed files with 18 additions and 67 deletions

View File

@@ -9,7 +9,7 @@
<Setter Property="BorderThickness" Value="{ThemeResource CardBorderThickness}" />
<Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
<Setter Property="Padding" Value="16" />
<Setter Property="Margin" Value="0,0,0,2"/>
<Setter Property="Margin" Value="0,0,0,0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:Setting">
@@ -74,7 +74,7 @@
FontSize="{StaticResource SecondaryTextFontSize}"
Foreground="{ThemeResource TextFillColorSecondaryBrush}">
<ContentPresenter.Resources>
<Style TargetType="TextBlock" BasedOn="{StaticResource CaptionTextBlockStyle}">
<Style TargetType="TextBlock" BasedOn="{StaticResource CaptionTextBlockStyle}">
<Style.Setters>
<Setter Property="TextWrapping" Value="WrapWholeWords"/>
</Style.Setters>

View File

@@ -1,21 +0,0 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.UI.Xaml.Controls;
namespace Microsoft.PowerToys.Settings.UI.Controls
{
public class SettingExpander : Expander
{
public SettingExpander()
{
DefaultStyleKey = typeof(SettingExpander);
}
}
}

View File

@@ -1,15 +0,0 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls">
<Style TargetType="controls:SettingExpander" BasedOn="{StaticResource DefaultExpanderStyle}" >
<Setter Property="Background" Value="{ThemeResource CardBackgroundBrush}" />
<Setter Property="BorderThickness" Value="{ThemeResource CardBorderThickness}" />
<Setter Property="BorderBrush" Value="{ThemeResource CardBorderBrush}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
</ResourceDictionary>

View File

@@ -99,7 +99,6 @@
<DependentUpon>HotkeySettingsControl.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\KeyVisual\KeyVisual.cs" />
<Compile Include="Controls\SettingExpander\SettingExpander.cs" />
<Compile Include="Controls\SettingsGroup\SettingsGroup.cs" />
<Compile Include="Controls\Setting\Setting.cs" />
<Compile Include="Controls\ShortcutTextControl.xaml.cs">
@@ -282,7 +281,7 @@
<Version>6.1.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.UI.Xaml">
<Version>2.6.1-prerelease.210709001</Version>
<Version>2.6.0-prerelease.210623001</Version>
</PackageReference>
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed">
<Version>2.0.1</Version>
@@ -313,10 +312,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\SettingExpander\SettingExpander.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\SettingsGroup\SettingsGroup.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>

View File

@@ -268,19 +268,15 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
<value>Select the profile to display the active key remap and shortcuts</value>
<comment>Keyboard Manager configuration dropdown description</comment>
</data>
<data name="KeyboardManager_RemapKeyboardButton.Content" xml:space="preserve">
<data name="KeyboardManager_RemapKeyboardButton.Header" xml:space="preserve">
<value>Remap a key</value>
<comment>Keyboard Manager remap keyboard button content</comment>
</data>
<data name="KeyboardManager_RemapKeys.Header" xml:space="preserve">
<value>Remap keys</value>
<comment>Keyboard Manager remap keyboard header</comment>
</data>
<data name="KeyboardManager_Keys.Header" xml:space="preserve">
<value>Keys</value>
<comment>Keyboard Manager remap keyboard header</comment>
</data>
<data name="KeyboardManager_RemapShortcutsButton.Content" xml:space="preserve">
<data name="KeyboardManager_RemapShortcutsButton.Header" xml:space="preserve">
<value>Remap a shortcut</value>
<comment>Keyboard Manager remap shortcuts button</comment>
</data>
@@ -288,10 +284,6 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
<value>Shortcuts</value>
<comment>Keyboard Manager remap keyboard header</comment>
</data>
<data name="KeyboardManager_RemapShortcuts.Header" xml:space="preserve">
<value>Remap shortcuts</value>
<comment>Keyboard Manager remap shortcuts header</comment>
</data>
<data name="RemapKeysList.AutomationProperties.Name" xml:space="preserve">
<value>Current Key Remappings</value>
</data>
@@ -836,10 +828,10 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
<data name="Encoding.Header" xml:space="preserve">
<value>Encoding</value>
</data>
<data name="KeyboardManager_RemapKeys.Description" xml:space="preserve">
<data name="KeyboardManager_RemapKeyboardButton.Description" xml:space="preserve">
<value>Remap keys to other keys or shortcuts.</value>
</data>
<data name="KeyboardManager_RemapShortcuts.Description" xml:space="preserve">
<data name="KeyboardManager_RemapShortcutsButton.Description" xml:space="preserve">
<value>Remap shortcuts to other shortcuts or keys. Additionally, mappings can be targeted to specific applications as well.</value>
</data>
<data name="General.ModuleDescription" xml:space="preserve">

View File

@@ -5,6 +5,5 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ms-appx:///Controls/Setting/Setting.xaml" />
<ResourceDictionary Source="ms-appx:///Controls/SettingsGroup/SettingsGroup.xaml" />
<ResourceDictionary Source="ms-appx:///Controls/SettingExpander/SettingExpander.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

View File

@@ -40,7 +40,7 @@
</controls:Setting.ActionContent>
</controls:Setting>
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander IsExpanded="True">
<muxc:Expander.Header>
<controls:Setting x:Uid="Awake_Mode" Icon="&#xEC4E;" Style="{StaticResource ExpanderHeaderSettingStyle}" />
</muxc:Expander.Header>

View File

@@ -43,7 +43,7 @@
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<muxc:Expander IsExpanded="True" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<muxc:Expander.Header>
<controls:Setting x:Uid="ColorPicker_ActivationAction" Icon="&#xEC4E;" Style="{StaticResource ExpanderHeaderSettingStyle}" />
</muxc:Expander.Header>
@@ -81,7 +81,7 @@
<controls:SettingsGroup x:Uid="ColorFormats" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander IsExpanded="True">
<muxc:Expander.Header>
<controls:Setting x:Uid="ColorPicker_CopiedColorRepresentation" Icon="&#xEF3C;" Style="{StaticResource ExpanderHeaderSettingStyle}">
<controls:Setting.ActionContent>

View File

@@ -29,6 +29,7 @@
<StackPanel Orientation="Vertical">
<toolkitcontrols:HeaderedItemsControl x:Uid="General_Version">
<controls:Setting Header="{Binding PowerToysVersion}" Icon="&#xE117;">
<controls:Setting.Description>
<TextBlock Style="{StaticResource SecondaryTextStyle}">
@@ -180,7 +181,7 @@
<toolkitcontrols:HeaderedItemsControl x:Uid="Admin_Mode">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander IsExpanded="True">
<muxc:Expander.Header>
<controls:Setting x:Uid="Admin_Mode" Icon="&#xE1A7;" Description="{Binding Mode=TwoWay, Path=RunningAsText}" Style="{StaticResource ExpanderHeaderSettingStyle}">
<controls:Setting.ActionContent>
@@ -215,7 +216,7 @@
<toolkitcontrols:HeaderedItemsControl IsEnabled="True" x:Uid="ShortcutGuide_Appearance_Behavior">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander IsExpanded="True">
<muxc:Expander.Header>
<controls:Setting x:Uid="ColorModeHeader" Icon="&#xE771;" Style="{StaticResource ExpanderHeaderSettingStyle}">
<controls:Setting.Description>

View File

@@ -219,7 +219,7 @@
<controls:SettingsGroup x:Uid="File" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander IsExpanded="True">
<muxc:Expander.Header>
<controls:Setting x:Uid="ImageResizer_FilenameFormatHeader" Style="{StaticResource ExpanderHeaderSettingStyle}">
<controls:Setting.ActionContent>

View File

@@ -27,7 +27,7 @@
</controls:Setting>
<controls:SettingsGroup x:Uid="PowerRename_ShellIntegration">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander IsExpanded="True">
<muxc:Expander.Header>
<controls:Setting x:Uid="PowerRename_Toggle_EnableOnContextMenu" Icon="&#xE14C;" Style="{StaticResource ExpanderHeaderSettingStyle}">
<controls:Setting.ActionContent>
@@ -44,7 +44,7 @@
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="PowerRename_AutoCompleteHeader">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander IsExpanded="True">
<muxc:Expander.Header>
<controls:Setting x:Uid="PowerRename_Toggle_AutoComplete" Style="{StaticResource ExpanderHeaderSettingStyle}">
<controls:Setting.ActionContent>

View File

@@ -48,7 +48,7 @@
</controls:Setting>
<controls:SettingsGroup x:Uid="ShortcutGuide_Appearance_Behavior" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander IsExpanded="True">
<muxc:Expander.Header>
<controls:Setting x:Uid="ColorModeHeader" Icon="&#xE771;" Style="{StaticResource ExpanderHeaderSettingStyle}">
<controls:Setting.Description>
@@ -77,7 +77,7 @@
</StackPanel>
</muxc:Expander.Content>
</muxc:Expander>
<muxc:Expander IsExpanded="True" Style="{StaticResource SettingsExpanderStyle}">
<muxc:Expander IsExpanded="True">
<muxc:Expander.Header>
<controls:Setting x:Uid="ShortcutGuide_DisabledApps" Style="{StaticResource ExpanderHeaderSettingStyle}"/>
</muxc:Expander.Header>