[Settings] Multiple UX refinements (e.g. OOBE) (#5113)

* Updated FZ page with new resizing logic

* Multiple UX fixes. Added updated resizing logic to other pages

* Added ImageResizer file format example snippets to tooltip

* Added warning icon in hotkeysettingscontrol

* Fixed formatting

* Keys label can now be set

* Replaced custom titleblocks with converter

* Updated strings

* Added correct links to the images. Added PT description on General page as well.

* Colorpicker image updates

* Rounded corners

* Fix

* Added back in correct subtitles
This commit is contained in:
Niels Laute
2020-07-24 21:02:56 +02:00
committed by GitHub
parent beb4494534
commit 65b6513207
26 changed files with 763 additions and 791 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 KiB

After

Width:  |  Height:  |  Size: 593 KiB

View File

@@ -2,7 +2,8 @@
x:Class="Microsoft.PowerToys.Settings.UI.App" x:Class="Microsoft.PowerToys.Settings.UI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xaml="using:Microsoft.Toolkit.Win32.UI.XamlHost"> xmlns:xaml="using:Microsoft.Toolkit.Win32.UI.XamlHost"
xmlns:converters="using:Microsoft.PowerToys.Settings.UI.Converters">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
@@ -15,6 +16,7 @@
<ResourceDictionary Source="/Styles/Page.xaml"/> <ResourceDictionary Source="/Styles/Page.xaml"/>
<ResourceDictionary Source="/Styles/Button.xaml"/> <ResourceDictionary Source="/Styles/Button.xaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<converters:ModuleEnabledToForegroundConverter x:Key="ModuleEnabledToForegroundConverter"/>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>
</xaml:XamlApplication> </xaml:XamlApplication>

View File

@@ -1,28 +0,0 @@
<UserControl
x:Class="Microsoft.PowerToys.Settings.UI.Controls.BodyTextBlock"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<Grid>
<TextBlock x:Name="CustomTextBlock"
Style="{StaticResource BodyTextBlockStyle}"
Margin="{StaticResource SmallTopMargin}" >
<Interactivity:Interaction.Behaviors>
<Core:DataTriggerBehavior Binding="{Binding Tag, ElementName=CustomTextBlock}" Value="False">
<Core:ChangePropertyAction TargetObject="{Binding ElementName=CustomTextBlock}" PropertyName="Foreground" Value="{ThemeResource SystemColorGrayTextBrush}" />
</Core:DataTriggerBehavior>
<Core:DataTriggerBehavior Binding="{Binding Tag, ElementName=CustomTextBlock}" Value="True">
<Core:ChangePropertyAction TargetObject="{Binding ElementName=CustomTextBlock}" PropertyName="Foreground" Value="{ThemeResource SystemBaseHighColor}" />
</Core:DataTriggerBehavior>
</Interactivity:Interaction.Behaviors>
</TextBlock>
</Grid>
</UserControl>

View File

@@ -1,95 +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.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
namespace Microsoft.PowerToys.Settings.UI.Controls
{
public sealed partial class BodyTextBlock : UserControl
{
public static readonly DependencyProperty TextProperty =
DependencyProperty.Register(
"Text",
typeof(string),
typeof(GroupTitleTextBlock),
null);
public string _text;
public string Text
{
get
{
return _text;
}
set
{
_text = value;
CustomTextBlock.Text = value;
SetValue(TextProperty, value);
}
}
public static readonly DependencyProperty IsActiveProperty =
DependencyProperty.Register(
"IsActive",
typeof(string),
typeof(GroupTitleTextBlock),
null);
private string _isActive = "False";
public string IsActive
{
get
{
return _isActive;
}
set
{
SetValue(IsActiveProperty, value);
_isActive = value;
CustomTextBlock.Tag = value;
}
}
private Windows.UI.Text.FontWeight _fontWeight;
public Windows.UI.Text.FontWeight FontWeight
{
get
{
return _fontWeight;
}
set
{
_fontWeight = value;
CustomTextBlock.FontWeight = value;
}
}
public BodyTextBlock()
{
this.InitializeComponent();
CustomTextBlock.Tag = "False";
}
}
}

View File

@@ -1,29 +0,0 @@
<UserControl
x:Class="Microsoft.PowerToys.Settings.UI.Controls.GroupTitleTextBlock"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<Grid>
<TextBlock
x:Name="CustomTextBlock"
Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource MediumTopMargin}">
<Interactivity:Interaction.Behaviors>
<Core:DataTriggerBehavior Binding="{Binding Tag, ElementName=CustomTextBlock}" Value="False">
<Core:ChangePropertyAction TargetObject="{Binding ElementName=CustomTextBlock}" PropertyName="Foreground" Value="{ThemeResource SystemColorGrayTextBrush}" />
</Core:DataTriggerBehavior>
<Core:DataTriggerBehavior Binding="{Binding Tag, ElementName=CustomTextBlock}" Value="True">
<Core:ChangePropertyAction TargetObject="{Binding ElementName=CustomTextBlock}" PropertyName="Foreground" Value="{ThemeResource SystemBaseHighColor}" />
</Core:DataTriggerBehavior>
</Interactivity:Interaction.Behaviors>
</TextBlock>
</Grid>
</UserControl>

View File

@@ -1,73 +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.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Popups;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
namespace Microsoft.PowerToys.Settings.UI.Controls
{
public sealed partial class GroupTitleTextBlock : UserControl
{
public string _text;
public string Text
{
get
{
return _text;
}
set
{
_text = value;
CustomTextBlock.Text = value;
}
}
public static readonly DependencyProperty IsActiveProperty =
DependencyProperty.Register(
"IsActive",
typeof(string),
typeof(GroupTitleTextBlock),
null);
private string _isActive = "False";
public string IsActive
{
get
{
return _isActive;
}
set
{
SetValue(IsActiveProperty, value.ToString());
_isActive = value.ToString();
CustomTextBlock.Tag = value.ToString();
}
}
public GroupTitleTextBlock()
{
this.InitializeComponent();
DataContext = this;
CustomTextBlock.Tag = "False";
}
}
}

View File

@@ -8,7 +8,32 @@
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="300" d:DesignHeight="300"
d:DesignWidth="400"> d:DesignWidth="400">
<TextBox x:Name="HotkeyTextBox" <StackPanel Orientation="Vertical">
IsReadOnly="True" <ToolTipService.ToolTip>
Header="{x:Bind Header, Mode=OneTime}"/> <ToolTip>
<StackPanel Orientation="Vertical">
<TextBlock x:Uid="ShortcutWarningLabel"/>
<TextBlock Text="{x:Bind Keys, Mode=OneTime}" FontWeight="SemiBold"/>
</StackPanel>
</ToolTip>
</ToolTipService.ToolTip>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="TitleText"
Text="{x:Bind Header, Mode=OneTime}"
Foreground="{Binding Path=IsEnabled, ElementName=HotkeyTextBox, Converter={StaticResource ModuleEnabledToForegroundConverter}}"
/>
<TextBlock x:Name="TitleGlyph" Text="&#xE946;"
FontFamily="Segoe MDL2 Assets"
Margin="4,4,0,0"
Foreground="{Binding Path=IsEnabled, ElementName=HotkeyTextBox, Converter={StaticResource ModuleEnabledToForegroundConverter}}"
/>
</StackPanel>
<TextBox x:Name="HotkeyTextBox"
Margin="0,5,0,0"
IsReadOnly="True"
/>
</StackPanel>
</UserControl> </UserControl>

View File

@@ -3,30 +3,29 @@
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using Microsoft.PowerToys.Settings.UI.Lib; using Microsoft.PowerToys.Settings.UI.Lib;
using System;
using Windows.UI.Core; using Windows.UI.Core;
using Windows.UI.Xaml; using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Input;
using System;
using System.Data;
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
namespace Microsoft.PowerToys.Settings.UI.Controls namespace Microsoft.PowerToys.Settings.UI.Controls
{ {
public sealed partial class HotkeySettingsControl : UserControl public sealed partial class HotkeySettingsControl : UserControl
{ {
public string Header { get; set; } public string Header { get; set; }
public string Keys { get; set; }
public static readonly DependencyProperty IsActiveProperty = public static readonly DependencyProperty IsActiveProperty =
DependencyProperty.Register( DependencyProperty.Register(
"Enabled", "Enabled",
typeof(string), typeof(bool),
typeof(HotkeySettingsControl), typeof(HotkeySettingsControl),
null); null);
private string _enabled = "False"; private bool _enabled = false;
public string Enabled public bool Enabled
{ {
get get
{ {
@@ -38,13 +37,17 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
SetValue(IsActiveProperty, value); SetValue(IsActiveProperty, value);
_enabled = value; _enabled = value;
if (value.ToString().ToLower() == "true") if (value)
{ {
HotkeyTextBox.IsEnabled = true; HotkeyTextBox.IsEnabled = true;
//TitleText.IsActive = "True";
//TitleGlyph.IsActive = "True";
} }
else else
{ {
HotkeyTextBox.IsEnabled = false; HotkeyTextBox.IsEnabled = false;
//TitleText.IsActive = "False";
//TitleGlyph.IsActive = "False";
} }
} }
} }

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media;
namespace Microsoft.PowerToys.Settings.UI.Converters
{
public sealed class ModuleEnabledToForegroundConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
bool isEnabled = (bool)value;
if (isEnabled)
{
return new SolidColorBrush((Color)Application.Current.Resources["SystemBaseHighColor"]);
}
else
{
return (SolidColorBrush)Application.Current.Resources["SystemControlDisabledBaseMediumLowBrush"];
}
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
return value;
}
}
}

View File

@@ -93,15 +93,10 @@
</Compile> </Compile>
<Compile Include="Behaviors\NavigationViewHeaderBehavior.cs" /> <Compile Include="Behaviors\NavigationViewHeaderBehavior.cs" />
<Compile Include="Behaviors\NavigationViewHeaderMode.cs" /> <Compile Include="Behaviors\NavigationViewHeaderMode.cs" />
<Compile Include="Controls\BodyTextBlock.xaml.cs">
<DependentUpon>BodyTextBlock.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\GroupTitleTextBlock.xaml.cs">
<DependentUpon>GroupTitleTextBlock.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\HotkeySettingsControl.xaml.cs"> <Compile Include="Controls\HotkeySettingsControl.xaml.cs">
<DependentUpon>HotkeySettingsControl.xaml</DependentUpon> <DependentUpon>HotkeySettingsControl.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Converters\ModuleEnabledToForegroundConverter.cs" />
<Compile Include="Generated Files\AssemblyInfo.cs"> <Compile Include="Generated Files\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
@@ -207,14 +202,6 @@
<PRIResource Include="Strings\en-us\Resources.resw" /> <PRIResource Include="Strings\en-us\Resources.resw" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="Controls\BodyTextBlock.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\GroupTitleTextBlock.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\HotkeySettingsControl.xaml"> <Page Include="Controls\HotkeySettingsControl.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>

View File

@@ -170,7 +170,7 @@
<comment>Keyboard Manager current configuration header</comment> <comment>Keyboard Manager current configuration header</comment>
</data> </data>
<data name="KeyboardManager_Description.Text" xml:space="preserve"> <data name="KeyboardManager_Description.Text" xml:space="preserve">
<value>Reconfigure your keyboard by remapping keys and shortcuts</value> <value>Reconfigure your keyboard by remapping keys and shortcuts.</value>
<comment>Keyboard Manager page description</comment> <comment>Keyboard Manager page description</comment>
</data> </data>
<data name="KeyboardManager_EnableToggle.Header" xml:space="preserve"> <data name="KeyboardManager_EnableToggle.Header" xml:space="preserve">
@@ -198,19 +198,19 @@
<comment>Keyboard Manager remap shortcuts header</comment> <comment>Keyboard Manager remap shortcuts header</comment>
</data> </data>
<data name="ColorPicker_Description.Text" xml:space="preserve"> <data name="ColorPicker_Description.Text" xml:space="preserve">
<value>Quick and simple system-wide color picker</value> <value>Quick and simple system-wide color picker.</value>
</data> </data>
<data name="ColorPicker_EnableColorPicker.Header" xml:space="preserve"> <data name="ColorPicker_EnableColorPicker.Header" xml:space="preserve">
<value>Enable Color Picker</value> <value>Enable Color Picker</value>
</data> </data>
<data name="ColorPicker_ChangeCursor.Header" xml:space="preserve"> <data name="ColorPicker_ChangeCursor.Content" xml:space="preserve">
<value>Change cursor when picking a color</value> <value>Change cursor when picking a color</value>
</data> </data>
<data name="ColorPicker_CopiedColorRepresentation.Header" xml:space="preserve"> <data name="ColorPicker_CopiedColorRepresentation.Header" xml:space="preserve">
<value>Copied color representation</value> <value>Copied color representation</value>
</data> </data>
<data name="ColorPicker_ActivationShortcut.Header" xml:space="preserve"> <data name="ColorPicker_ActivationShortcut.Header" xml:space="preserve">
<value>Activation shortcut</value> <value>Open Color Picker</value>
</data> </data>
<data name="PowerLauncher_Description.Text" xml:space="preserve"> <data name="PowerLauncher_Description.Text" xml:space="preserve">
<value>A quick launcher that has additional capabilities without sacrificing performance.</value> <value>A quick launcher that has additional capabilities without sacrificing performance.</value>
@@ -264,13 +264,13 @@
<value>Open console</value> <value>Open console</value>
</data> </data>
<data name="PowerLauncher_OverrideWinRKey.Content" xml:space="preserve"> <data name="PowerLauncher_OverrideWinRKey.Content" xml:space="preserve">
<value>Override Win+R key</value> <value>Override Win+R shortcut</value>
</data> </data>
<data name="PowerLauncher_OverrideWinSKey.Content" xml:space="preserve"> <data name="PowerLauncher_OverrideWinSKey.Content" xml:space="preserve">
<value>Override Win+S key</value> <value>Override Win+S shortcut</value>
</data> </data>
<data name="PowerLauncher_IgnoreHotkeysInFullScreen.Content" xml:space="preserve"> <data name="PowerLauncher_IgnoreHotkeysInFullScreen.Content" xml:space="preserve">
<value>Ignore hotkeys in fullscreen mode</value> <value>Ignore shortcuts in fullscreen mode</value>
</data> </data>
<data name="PowerLauncher_DisableDriveDetectionWarning.Content" xml:space="preserve"> <data name="PowerLauncher_DisableDriveDetectionWarning.Content" xml:space="preserve">
<value>Disable drive detection warning for the indexer plugin</value> <value>Disable drive detection warning for the indexer plugin</value>
@@ -306,8 +306,8 @@
<data name="FancyZones_HighlightOpacity.Header" xml:space="preserve"> <data name="FancyZones_HighlightOpacity.Header" xml:space="preserve">
<value>Zone highlight opacity</value> <value>Zone highlight opacity</value>
</data> </data>
<data name="FancyZones_HotkeyEditorControl.Text" xml:space="preserve"> <data name="FancyZones_HotkeyEditorControl.Header" xml:space="preserve">
<value>Edit hotkey / shortcut</value> <value>Open zones editor</value>
</data> </data>
<data name="FancyZones_LaunchEditorButtonControl.Text" xml:space="preserve"> <data name="FancyZones_LaunchEditorButtonControl.Text" xml:space="preserve">
<value>Launch zones editor</value> <value>Launch zones editor</value>
@@ -322,10 +322,7 @@
<value>Move windows between zones across all monitors when snapping with (Win + Arrow)</value> <value>Move windows between zones across all monitors when snapping with (Win + Arrow)</value>
</data> </data>
<data name="FancyZones_OverrideSnapHotkeysCheckBoxControl.Content" xml:space="preserve"> <data name="FancyZones_OverrideSnapHotkeysCheckBoxControl.Content" xml:space="preserve">
<value>Override Windows Snap hotkeys (Win + Arrow) to move windows between zones</value> <value>Override Windows Snap shortcut (Win + Arrow) to move windows between zones</value>
</data>
<data name="FancyZones_SaveZoneHighlightColor.Content" xml:space="preserve">
<value>Save Zone Highlight Color Choice</value>
</data> </data>
<data name="FancyZones_ShiftDragCheckBoxControl_Header.Content" xml:space="preserve"> <data name="FancyZones_ShiftDragCheckBoxControl_Header.Content" xml:space="preserve">
<value>Hold Shift key to activate zones while dragging</value> <value>Hold Shift key to activate zones while dragging</value>
@@ -390,9 +387,6 @@
<data name="GeneralPage_ToggleSwitch_RunAtStartUp.Header" xml:space="preserve"> <data name="GeneralPage_ToggleSwitch_RunAtStartUp.Header" xml:space="preserve">
<value>Run at startup</value> <value>Run at startup</value>
</data> </data>
<data name="MiscellaneousTextBlockTitle.Text" xml:space="preserve">
<value>Miscellaneous</value>
</data>
<data name="PowerRename_Description.Text" xml:space="preserve"> <data name="PowerRename_Description.Text" xml:space="preserve">
<value>A Windows Shell extension for more advanced bulk renaming using search and replace or regular expressions.</value> <value>A Windows Shell extension for more advanced bulk renaming using search and replace or regular expressions.</value>
</data> </data>
@@ -414,7 +408,7 @@
<data name="PowerRename_Toggle_MaxDispListNum.Text" xml:space="preserve"> <data name="PowerRename_Toggle_MaxDispListNum.Text" xml:space="preserve">
<value>Maximum number of items</value> <value>Maximum number of items</value>
</data> </data>
<data name="PowerRename_Toggle_RestoreFlagsOnLaunch.Header" xml:space="preserve"> <data name="PowerRename_Toggle_RestoreFlagsOnLaunch.Content" xml:space="preserve">
<value>Show values from last use</value> <value>Show values from last use</value>
</data> </data>
<data name="FileExplorerPreview_ToggleSwitch_Preview_MD.Header" xml:space="preserve"> <data name="FileExplorerPreview_ToggleSwitch_Preview_MD.Header" xml:space="preserve">
@@ -435,7 +429,7 @@
<data name="OpenSource_Notice.Text" xml:space="preserve"> <data name="OpenSource_Notice.Text" xml:space="preserve">
<value>Open-source notice</value> <value>Open-source notice</value>
</data> </data>
<data name="PowerRename_Toggle_AutoComplete.Header" xml:space="preserve"> <data name="PowerRename_Toggle_AutoComplete.Content" xml:space="preserve">
<value>Enable autocomplete for the search and replace fields</value> <value>Enable autocomplete for the search and replace fields</value>
</data> </data>
<data name="FancyZones_BorderColor.Text" xml:space="preserve"> <data name="FancyZones_BorderColor.Text" xml:space="preserve">
@@ -444,12 +438,6 @@
<data name="FancyZones_InActiveColor.Text" xml:space="preserve"> <data name="FancyZones_InActiveColor.Text" xml:space="preserve">
<value>Zone inactive color (Default: #F5FCFF)</value> <value>Zone inactive color (Default: #F5FCFF)</value>
</data> </data>
<data name="FancyZones_SaveBorderColor.Content" xml:space="preserve">
<value>Save Zone Border Color Choice</value>
</data>
<data name="FancyZones_SaveZoneInActiveColor.Content" xml:space="preserve">
<value>Save Zone Inactive Color Choice</value>
</data>
<data name="ShortcutGuide_Description.Text" xml:space="preserve"> <data name="ShortcutGuide_Description.Text" xml:space="preserve">
<value>Shows a help overlay with Windows shortcuts when the Windows key is pressed.</value> <value>Shows a help overlay with Windows shortcuts when the Windows key is pressed.</value>
</data> </data>
@@ -624,14 +612,8 @@
<data name="General_RunAsAdminRequired.Text" xml:space="preserve"> <data name="General_RunAsAdminRequired.Text" xml:space="preserve">
<value>You need to run as administrator to use this setting</value> <value>You need to run as administrator to use this setting</value>
</data> </data>
<data name="FancyZones_HotkeyEditorControl.ToolTipService.ToolTip" xml:space="preserve"> <data name="ShortcutWarningLabel.Text" xml:space="preserve">
<value>Only shortcuts with the following hotkeys are valid: Win, Ctrl, Alt, Shift.</value> <value>Only shortcuts with the following hotkeys are valid:</value>
</data>
<data name="FancyZones_HotkeyEditorControl_Icon.ToolTipService.ToolTip" xml:space="preserve">
<value>Only shortcuts with the following hotkeys are valid: Win, Ctrl, Alt, Shift.</value>
</data>
<data name="FancyZones_HotkeyEditorControl_TextBox.ToolTipService.ToolTip" xml:space="preserve">
<value>Only shortcuts with the following hotkeys are valid: Win, Ctrl, Alt, Shift.</value>
</data> </data>
<data name="FancyZones_RestoreSize.Content" xml:space="preserve"> <data name="FancyZones_RestoreSize.Content" xml:space="preserve">
<value>Restore the original size of windows when unsnapping</value> <value>Restore the original size of windows when unsnapping</value>
@@ -642,7 +624,7 @@
<data name="ImageResizer_FileFormatDescription.Text" xml:space="preserve"> <data name="ImageResizer_FileFormatDescription.Text" xml:space="preserve">
<value>The following parameters can be used:</value> <value>The following parameters can be used:</value>
</data> </data>
<data name="ImageResizer_FilenameFormatHeader.Header" xml:space="preserve"> <data name="ImageResizer_FilenameFormatHeader.Text" xml:space="preserve">
<value>Filename format</value> <value>Filename format</value>
</data> </data>
<data name="ImageResizer_UseOriginalDate.Content" xml:space="preserve"> <data name="ImageResizer_UseOriginalDate.Content" xml:space="preserve">
@@ -651,4 +633,13 @@
<data name="Encoding.Text" xml:space="preserve"> <data name="Encoding.Text" xml:space="preserve">
<value>Encoding</value> <value>Encoding</value>
</data> </data>
<data name="KeyboardManager_RemapKeyboardSubtitle.Text" xml:space="preserve">
<value>Remap keys to other keys or shortcuts.</value>
</data>
<data name="KeyboardManager_RemapShortcutsSubtitle.Text" 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="About_PowerToys.Text" xml:space="preserve">
<value>Microsoft PowerToys is a set of utilities for power users to tune and streamline their Windows experience for greater productivity</value>
</data>
</root> </root>

View File

@@ -20,7 +20,7 @@
<Style x:Key="SettingsGroupTitleStyle" TargetType="TextBlock" BasedOn="{StaticResource SubtitleTextBlockStyle}"> <Style x:Key="SettingsGroupTitleStyle" TargetType="TextBlock" BasedOn="{StaticResource SubtitleTextBlockStyle}">
<Setter Property="Margin" Value="0,34,0,8" /> <Setter Property="Margin" Value="0,34,0,4" />
<Setter Property="FontWeight" Value="SemiBold"/>
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,5 +1,5 @@
<ResourceDictionary <ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="ThemeControlForegroundBaseHighBrush" Color="{ThemeResource SystemBaseHighColor}"></SolidColorBrush> <SolidColorBrush x:Key="ThemeControlForegroundBaseHighBrush" Color="{ThemeResource SystemBaseHighColor}"/>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Styles"> xmlns:local="using:Microsoft.PowerToys.Settings.UI.Styles">
<x:Double x:Key="SidePanelWidth">180</x:Double> <x:Double x:Key="SidePanelWidth">240</x:Double>
<!-- Breakpoint for wide layout (side panel next to content) --> <!-- Breakpoint for wide layout (side panel next to content) -->
<x:Double x:Key="WideLayoutMinWidth">1100</x:Double> <x:Double x:Key="WideLayoutMinWidth">1100</x:Double>

View File

@@ -19,9 +19,11 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="1" /> <Setter Target="SidePanel.(Grid.Column)" Value="1"/>
<Setter Target="SidePanel.(Grid.Row)" Value="0" /> <Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}"/>
<Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}" /> <Setter Target="ColorPickerSettingsView.(Grid.Row)" Value="0" />
<Setter Target="LinksPanel.(RelativePanel.Below)" Value="AboutImage"/>
<Setter Target="AboutTitle.Visibility" Value="Visible" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="SmallLayout"> <VisualState x:Name="SmallLayout">
@@ -29,9 +31,13 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="0" /> <Setter Target="SidePanel.(Grid.Column)" Value="0"/>
<Setter Target="SidePanel.(Grid.Row)" Value="1" /> <Setter Target="SidePanel.Width" Value="500"/>
<Setter Target="SidePanel.Width" Value="Auto" /> <Setter Target="ColorPickerSettingsView.(Grid.Row)" Value="1" />
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage"/>
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage"/>
<Setter Target="AboutImage.Margin" Value="0,12,12,0"/>
<Setter Target="AboutTitle.Visibility" Value="Collapsed" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@@ -45,68 +51,84 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical" x:Name="ColorPickerSettingsView">
<TextBlock x:Uid="ColorPicker_Description"
TextWrapping="Wrap"/>
<ToggleSwitch x:Uid="ColorPicker_EnableColorPicker" <ToggleSwitch x:Uid="ColorPicker_EnableColorPicker"
IsOn="{Binding IsEnabled, Mode=TwoWay}" IsOn="{Binding IsEnabled, Mode=TwoWay}"/>
Margin="{StaticResource MediumTopMargin}"/>
<Custom:HotkeySettingsControl x:Uid="ColorPicker_ActivationShortcut" <Custom:HotkeySettingsControl x:Uid="ColorPicker_ActivationShortcut"
Width="240" Width="240"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource MediumTopMargin}"
HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}" HotkeySettings="{x:Bind Path=ViewModel.ActivationShortcut, Mode=TwoWay}"
IsEnabled="{Binding IsEnabled}"/> Keys="Win, Ctrl, Alt, Shift"
Enabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
/>
<TextBlock x:Uid="ShortcutGuide_Appearance_Behavior"
Style="{StaticResource SettingsGroupTitleStyle}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<ComboBox x:Uid="ColorPicker_CopiedColorRepresentation" <ComboBox x:Uid="ColorPicker_CopiedColorRepresentation"
SelectedIndex="{Binding CopiedColorRepresentationIndex, Mode=TwoWay}" SelectedIndex="{Binding CopiedColorRepresentationIndex, Mode=TwoWay}"
Width="240"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
Width="240"
IsEnabled="{Binding IsEnabled}"> IsEnabled="{Binding IsEnabled}">
<ComboBoxItem Content="HEX - #FFAA00"/> <ComboBoxItem Content="HEX - #FFAA00"/>
<ComboBoxItem Content="RGB - RGB(100, 50, 75)"/> <ComboBoxItem Content="RGB - RGB(100, 50, 75)"/>
</ComboBox> </ComboBox>
<!-- <!--
Disabling this until we have a safer way to reset cursor as Disabling this until we have a safer way to reset cursor as
we can hit a state where the cursor doesn't reset we can hit a state where the cursor doesn't reset
<ToggleSwitch x:Uid="ColorPicker_ChangeCursor" <CheckBox x:Uid="ColorPicker_ChangeCursor"
IsOn="{Binding ChangeCursor, Mode=TwoWay}" IsChecked="{Binding ChangeCursor, Mode=TwoWay}"
Margin="{StaticResource MediumTopMargin}" Margin="{StaticResource SmallTopMargin}"
IsEnabled="{Binding IsEnabled}" /> IsEnabled="{Binding IsEnabled}"/>
--> -->
</StackPanel> </StackPanel>
<StackPanel
x:Name="SidePanel"
Orientation="Vertical"
HorizontalAlignment="Left"
Width="{StaticResource SidePanelWidth}"
Grid.Column="1">
<TextBlock <RelativePanel x:Name="SidePanel"
x:Uid="About_ColorPicker" HorizontalAlignment="Left"
Style="{StaticResource SettingsGroupTitleStyle}" Width="{StaticResource SidePanelWidth}"
Margin="{StaticResource XSmallBottomMargin}"/> Grid.Column="1">
<StackPanel x:Name="DescriptionPanel">
<TextBlock x:Uid="About_ColorPicker" x:Name="AboutTitle" Grid.ColumnSpan="2"
Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource XSmallBottomMargin}"/>
<TextBlock x:Uid="ColorPicker_Description"
TextWrapping="Wrap"
Grid.Row="1" />
</StackPanel>
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_ColorPicker"> <Border x:Name="AboutImage"
<TextBlock x:Uid="Module_overview" /> CornerRadius="4"
</HyperlinkButton> Grid.Row="2"
MaxWidth="240"
HorizontalAlignment="Left"
Margin="{StaticResource SmallTopBottomMargin}"
RelativePanel.Below="DescriptionPanel">
<Image Source="https://aka.ms/powerToysColorPickerSettingImage" />
</Border>
<StackPanel x:Name="LinksPanel"
RelativePanel.Below="AboutImage"
Orientation="Vertical" >
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_ColorPicker">
<TextBlock x:Uid="Module_overview" />
</HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
<TextBlock x:Uid="Give_Feedback" />
</HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"> <TextBlock
<TextBlock x:Uid="Give_Feedback" />
</HyperlinkButton>
<TextBlock
x:Uid="AttributionTitle" x:Uid="AttributionTitle"
Style="{StaticResource SettingsGroupTitleStyle}" /> Style="{StaticResource SettingsGroupTitleStyle}" />
<HyperlinkButton <HyperlinkButton Margin="0,-3,0,0"
NavigateUri="https://github.com/martinchrzan/ColorPicker/"> NavigateUri="https://github.com/martinchrzan/ColorPicker/">
<TextBlock Text="Martin Chrzan's Color Picker" TextWrapping="Wrap" /> <TextBlock Text="Martin Chrzan's Color Picker" TextWrapping="Wrap" />
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</RelativePanel>
</Grid> </Grid>
</Page> </Page>

View File

@@ -19,7 +19,9 @@
<converters:StringFormatConverter x:Key="StringFormatConverter"/> <converters:StringFormatConverter x:Key="StringFormatConverter"/>
</Page.Resources> </Page.Resources>
<Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}" RowSpacing="{StaticResource DefaultRowSpacing}" x:Name="MainView"> <Grid ColumnSpacing="{StaticResource DefaultColumnSpacing}"
RowSpacing="{StaticResource DefaultRowSpacing}"
x:Name="MainView">
<VisualStateManager.VisualStateGroups> <VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="LayoutVisualStates"> <VisualStateGroup x:Name="LayoutVisualStates">
<VisualState x:Name="WideLayout"> <VisualState x:Name="WideLayout">
@@ -27,9 +29,11 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="1" /> <Setter Target="SidePanel.(Grid.Column)" Value="1"/>
<Setter Target="SidePanel.(Grid.Row)" Value="0" /> <Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}"/>
<Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}" /> <Setter Target="FZSettingsView.(Grid.Row)" Value="0" />
<Setter Target="LinksPanel.(RelativePanel.Below)" Value="AboutImage"/>
<Setter Target="AboutTitle.Visibility" Value="Visible" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="SmallLayout"> <VisualState x:Name="SmallLayout">
@@ -37,9 +41,13 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="0" /> <Setter Target="SidePanel.(Grid.Column)" Value="0"/>
<Setter Target="SidePanel.(Grid.Row)" Value="1" /> <Setter Target="SidePanel.Width" Value="500"/>
<Setter Target="SidePanel.Width" Value="Auto" /> <Setter Target="FZSettingsView.(Grid.Row)" Value="1" />
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage"/>
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage"/>
<Setter Target="AboutImage.Margin" Value="0,12,12,0"/>
<Setter Target="AboutTitle.Visibility" Value="Collapsed" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@@ -53,15 +61,10 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Vertical" x:Name="FZSettingsView"> <StackPanel x:Name="FZSettingsView" Orientation="Vertical">
<TextBlock x:Uid="FancyZones_Description"
TextWrapping="Wrap"/>
<ToggleSwitch x:Name="FancyZones_EnableToggleControl_HeaderText" <ToggleSwitch x:Name="FancyZones_EnableToggleControl_HeaderText"
x:Uid="FancyZones_EnableToggleControl_HeaderText" x:Uid="FancyZones_EnableToggleControl_HeaderText"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}"/>
Margin="{StaticResource MediumTopMargin}" />
<Button Margin="{StaticResource MediumTopMargin}" <Button Margin="{StaticResource MediumTopMargin}"
Style="{StaticResource AccentButtonStyle}" Style="{StaticResource AccentButtonStyle}"
Command = "{x:Bind ViewModel.LaunchEditorEventHandler}" Command = "{x:Bind ViewModel.LaunchEditorEventHandler}"
@@ -70,45 +73,22 @@
<Viewbox Height="12" Width="12"> <Viewbox Height="12" Width="12">
<PathIcon Data="M896 0v896H0V0h896zM768 768V128H128v640h640zM0 1920v-896h1920v896H0zm128-768v640h1664v-640H128zM1024 0h896v896h-896V0zm768 768V128h-640v640h640z"/> <PathIcon Data="M896 0v896H0V0h896zM768 768V128H128v640h640zM0 1920v-896h1920v896H0zm128-768v640h1664v-640H128zM1024 0h896v896h-896V0zm768 768V128h-640v640h640z"/>
</Viewbox> </Viewbox>
<TextBlock Margin="12,0,0,0" x:Uid="FancyZones_LaunchEditorButtonControl"/> <TextBlock Margin="12,0,0,0"
x:Uid="FancyZones_LaunchEditorButtonControl"/>
</StackPanel> </StackPanel>
</Button> </Button>
<CustomControls:GroupTitleTextBlock <TextBlock x:Uid="FancyZones_ZoneBehavior_GroupSettings"
x:Uid="FancyZones_ZoneBehavior_GroupSettings" Style="{StaticResource SettingsGroupTitleStyle}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
/>
<StackPanel Orientation="Horizontal" Margin="{StaticResource SmallTopMargin}">
<CustomControls:BodyTextBlock
x:Uid="FancyZones_HotkeyEditorControl"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
Margin="5,-12,0,0"
/>
<Viewbox Height="14" Width="14" Margin="5,2,0,0" >
<PathIcon
x:Name="FancyZones_HotkeyEditorControl_Icon"
x:Uid="FancyZones_HotkeyEditorControl_Icon"
VerticalAlignment="Center"
Data="M960 1920q-133 0-255-34t-230-96-194-150-150-195-97-229T0 960q0-133 34-255t96-230 150-194 195-150 229-97T960 0q133 0 255 34t230 96 194 150 150 195 97 229 34 256q0 133-34 255t-96 230-150 194-195 150-229 97-256 34zm0-1792q-115 0-221 30t-198 84-169 130-130 168-84 199-30 221q0 114 30 220t84 199 130 169 168 130 199 84 221 30q114 0 220-30t199-84 169-130 130-168 84-199 30-221q0-114-30-220t-84-199-130-169-168-130-199-84-221-30zm-64 640h128v640H896V768zm0-256h128v128H896V512z">
<Interactivity:Interaction.Behaviors>
<Core:DataTriggerBehavior Binding="{Binding IsOn, ElementName=FancyZones_EnableToggleControl_HeaderText}" Value="False">
<Core:ChangePropertyAction TargetObject="{Binding ElementName=FancyZones_HotkeyEditorControl_Icon}" PropertyName="Foreground" Value="{ThemeResource SystemChromeDisabledLowColor}" />
</Core:DataTriggerBehavior>
<Core:DataTriggerBehavior Binding="{Binding IsOn, ElementName=FancyZones_EnableToggleControl_HeaderText}" Value="True">
<Core:ChangePropertyAction TargetObject="{Binding ElementName=FancyZones_HotkeyEditorControl_Icon}" PropertyName="Foreground" Value="{ThemeResource SystemBaseHighColor}" />
</Core:DataTriggerBehavior>
</Interactivity:Interaction.Behaviors>
</PathIcon>
</Viewbox>
</StackPanel>
<CustomControls:HotkeySettingsControl <CustomControls:HotkeySettingsControl
x:Uid="FancyZones_HotkeyEditorControl_TextBox"
Width="240" Width="240"
x:Uid="FancyZones_HotkeyEditorControl"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="0,5,0,0" Margin="{StaticResource SmallTopMargin}"
HotkeySettings="{x:Bind Path=ViewModel.EditorHotkey, Mode=TwoWay}" HotkeySettings="{x:Bind Path=ViewModel.EditorHotkey, Mode=TwoWay}"
Keys="Win, Ctrl, Alt, Shift"
Enabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" Enabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
/> />
@@ -175,9 +155,9 @@
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
<CustomControls:GroupTitleTextBlock x:Uid="Appearance_GroupSettings" <TextBlock x:Uid="Appearance_GroupSettings"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" Style="{StaticResource SettingsGroupTitleStyle}"
/> Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<StackPanel Orientation="Horizontal" Margin="{StaticResource SmallTopMargin}" Spacing="12"> <StackPanel Orientation="Horizontal" Margin="{StaticResource SmallTopMargin}" Spacing="12">
<Slider x:Uid="FancyZones_HighlightOpacity" <Slider x:Uid="FancyZones_HighlightOpacity"
@@ -188,20 +168,27 @@
Value="{x:Bind Mode=TwoWay, Path=ViewModel.HighlightOpacity}" Value="{x:Bind Mode=TwoWay, Path=ViewModel.HighlightOpacity}"
HorizontalAlignment="Left" HorizontalAlignment="Left"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
<CustomControls:BodyTextBlock
Text="{x:Bind Mode=OneWay, Path=ViewModel.HighlightOpacity, Converter={StaticResource StringFormatConverter}, ConverterParameter=' {0}%' }" <TextBlock
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" Text="{x:Bind Mode=OneWay, Path=ViewModel.HighlightOpacity, Converter={StaticResource StringFormatConverter}, ConverterParameter=' {0}%' }"
VerticalAlignment="Center" VerticalAlignment="Center"
FontSize="16" FontWeight="SemiBold"
Margin="0,21,0,0"/> FontSize="16"
Margin="0,16,0,0"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
</StackPanel> </StackPanel>
<CustomControls:BodyTextBlock <TextBlock x:Uid="FancyZones_ZoneHighlightColor"
x:Uid="FancyZones_ZoneHighlightColor" Margin="{StaticResource SmallTopMargin}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<muxc:DropDownButton Margin="0,4,0,0" IsEnabled="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" Padding="4,4,8,4"> <muxc:DropDownButton Margin="0,4,0,0"
<Border Width="48" CornerRadius="2" Height="24"> IsEnabled="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}"
Padding="4,4,8,4">
<Border Width="48"
CornerRadius="2"
Height="24">
<Border.Background> <Border.Background>
<SolidColorBrush Color="{x:Bind Path=ViewModel.ZoneHighlightColor, Mode=TwoWay}"/> <SolidColorBrush Color="{x:Bind Path=ViewModel.ZoneHighlightColor, Mode=TwoWay}"/>
</Border.Background> </Border.Background>
@@ -224,11 +211,13 @@
</muxc:DropDownButton> </muxc:DropDownButton>
<CustomControls:BodyTextBlock <TextBlock x:Uid="FancyZones_InActiveColor"
x:Uid="FancyZones_InActiveColor" Margin="{StaticResource SmallTopMargin}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<muxc:DropDownButton Margin="0,4,0,0" IsEnabled="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" Padding="4,4,8,4"> <muxc:DropDownButton Margin="0,4,0,0"
IsEnabled="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}"
Padding="4,4,8,4">
<Border Width="48" CornerRadius="2" Height="24"> <Border Width="48" CornerRadius="2" Height="24">
<Border.Background> <Border.Background>
<SolidColorBrush Color="{x:Bind Path=ViewModel.ZoneInActiveColor, Mode=TwoWay}"/> <SolidColorBrush Color="{x:Bind Path=ViewModel.ZoneInActiveColor, Mode=TwoWay}"/>
@@ -250,11 +239,13 @@
</muxc:DropDownButton.Flyout> </muxc:DropDownButton.Flyout>
</muxc:DropDownButton> </muxc:DropDownButton>
<CustomControls:BodyTextBlock <TextBlock x:Uid="FancyZones_BorderColor"
x:Uid="FancyZones_BorderColor" Margin="{StaticResource SmallTopMargin}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" /> Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<muxc:DropDownButton Margin="0,4,0,0" IsEnabled="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" Padding="4,4,8,4"> <muxc:DropDownButton Margin="0,4,0,0"
IsEnabled="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}"
Padding="4,4,8,4">
<Border Width="48" CornerRadius="2" Height="24"> <Border Width="48" CornerRadius="2" Height="24">
<Border.Background> <Border.Background>
<SolidColorBrush Color="{x:Bind Path=ViewModel.ZoneBorderColor, Mode=TwoWay}"/> <SolidColorBrush Color="{x:Bind Path=ViewModel.ZoneBorderColor, Mode=TwoWay}"/>
@@ -277,10 +268,9 @@
</muxc:DropDownButton.Flyout> </muxc:DropDownButton.Flyout>
</muxc:DropDownButton> </muxc:DropDownButton>
<CustomControls:GroupTitleTextBlock <TextBlock x:Uid="FancyZones_ExcludeApps"
x:Uid="FancyZones_ExcludeApps" Style="{StaticResource SettingsGroupTitleStyle}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
/>
<TextBox x:Uid="FancyZones_ExcludeApps_TextBoxControl" <TextBox x:Uid="FancyZones_ExcludeApps_TextBoxControl"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
@@ -291,37 +281,41 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
TextWrapping="Wrap" TextWrapping="Wrap"
AcceptsReturn="True"/> AcceptsReturn="True"/>
</StackPanel> </StackPanel>
<StackPanel x:Name="SidePanel" <RelativePanel x:Name="SidePanel"
Orientation="Vertical"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Width="{StaticResource SidePanelWidth}" Width="{StaticResource SidePanelWidth}"
Grid.Column="1"> Grid.Column="1">
<StackPanel x:Name="DescriptionPanel">
<TextBlock x:Uid="About_FancyZones" <TextBlock x:Uid="About_FancyZones"
x:Name="AboutTitle" Grid.ColumnSpan="2"
Style="{StaticResource SettingsGroupTitleStyle}" Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource XSmallBottomMargin}"/> Margin="{StaticResource XSmallBottomMargin}"/>
<TextBlock x:Uid="FancyZones_Description"
TextWrapping="Wrap"/>
</StackPanel>
<Image MaxWidth="240" Source="https://aka.ms/powerToysFancyZoneSettingImage" /> <Border x:Name="AboutImage"
CornerRadius="4"
Grid.Row="2"
MaxWidth="240"
HorizontalAlignment="Left"
Margin="{StaticResource SmallTopBottomMargin}"
RelativePanel.Below="DescriptionPanel">
<Image Source="https://aka.ms/powerToysFancyZoneSettingImage" />
</Border>
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_FancyZones"> <StackPanel x:Name="LinksPanel"
<TextBlock x:Uid="Module_overview" /> RelativePanel.Below="AboutImage"
</HyperlinkButton> Orientation="Vertical" >
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_FancyZones" Margin="0,-3,0,0">
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"> <TextBlock x:Uid="Module_overview" />
<TextBlock x:Uid="Give_Feedback" /> </HyperlinkButton>
</HyperlinkButton> <HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
<TextBlock x:Uid="Give_Feedback" />
<!-- </HyperlinkButton>
<TextBlock Text="Contributors" </StackPanel>
Style="{StaticResource SettingsGroupTitleStyle}"/> </RelativePanel>
<HyperlinkButton Content="Contributor name"/>
<HyperlinkButton Content="Contributor name"/>
<HyperlinkButton Content="Contributor name"/>
-->
</StackPanel>
</Grid> </Grid>
</Page> </Page>

View File

@@ -26,9 +26,11 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="1" /> <Setter Target="SidePanel.(Grid.Column)" Value="1"/>
<Setter Target="SidePanel.(Grid.Row)" Value="0" /> <Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}"/>
<Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}" /> <Setter Target="GeneralSettingsView.(Grid.Row)" Value="0" />
<Setter Target="LinksPanel.(RelativePanel.Below)" Value="AboutImage"/>
<Setter Target="AboutTitle.Visibility" Value="Visible" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="SmallLayout"> <VisualState x:Name="SmallLayout">
@@ -36,9 +38,13 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="0" /> <Setter Target="SidePanel.(Grid.Column)" Value="0"/>
<Setter Target="SidePanel.(Grid.Row)" Value="1" /> <Setter Target="SidePanel.Width" Value="500"/>
<Setter Target="SidePanel.Width" Value="Auto" /> <Setter Target="GeneralSettingsView.(Grid.Row)" Value="1" />
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage"/>
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage"/>
<Setter Target="AboutImage.Margin" Value="0,12,12,0"/>
<Setter Target="AboutTitle.Visibility" Value="Collapsed" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@@ -54,7 +60,7 @@
<StackPanel Orientation="Vertical" <StackPanel Orientation="Vertical"
x:Name="GeneralSettingsView"> x:Name="GeneralSettingsView">
<TextBlock x:Uid="Admin_Mode" <TextBlock x:Uid="Admin_Mode" FontWeight="SemiBold"
Style="{StaticResource SubtitleTextBlockStyle}"/> Style="{StaticResource SubtitleTextBlockStyle}"/>
<TextBlock Text="{Binding Mode=TwoWay, Path=RunningAsText, Source={StaticResource eventViewModel}}" <TextBlock Text="{Binding Mode=TwoWay, Path=RunningAsText, Source={StaticResource eventViewModel}}"
@@ -85,7 +91,8 @@
<TextBlock x:Uid="ShortcutGuide_Appearance_Behavior" <TextBlock x:Uid="ShortcutGuide_Appearance_Behavior"
Style="{StaticResource SettingsGroupTitleStyle}"/> Style="{StaticResource SettingsGroupTitleStyle}"/>
<muxc:RadioButtons x:Uid="RadioButtons_Name_Theme" Margin="{StaticResource SmallTopMargin}"> <muxc:RadioButtons x:Uid="RadioButtons_Name_Theme"
Margin="{StaticResource SmallTopMargin}">
<RadioButton x:Uid="GeneralPage_Radio_Theme_Dark" <RadioButton x:Uid="GeneralPage_Radio_Theme_Dark"
Content="Dark" Content="Dark"
IsChecked="{ Binding Mode=TwoWay, Path=IsDarkThemeRadioButtonChecked, Source={StaticResource eventViewModel}}"/> IsChecked="{ Binding Mode=TwoWay, Path=IsDarkThemeRadioButtonChecked, Source={StaticResource eventViewModel}}"/>
@@ -106,8 +113,8 @@
<TextBlock x:Uid="General_Updates" <TextBlock x:Uid="General_Updates"
Style="{StaticResource SettingsGroupTitleStyle}"/> Style="{StaticResource SettingsGroupTitleStyle}"/>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal" Margin="{StaticResource SmallTopMargin}">
<TextBlock Text="Version: " x:Uid="General_Version" /> <TextBlock Text="Version: " x:Uid="General_Version" />
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/releases" Margin="4,-6,0,0"> <HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/releases" Margin="4,-6,0,0">
<TextBlock Text="{x:Bind ViewModel.PowerToysVersion }" /> <TextBlock Text="{x:Bind ViewModel.PowerToysVersion }" />
@@ -118,7 +125,6 @@
<Button x:Uid="GeneralPage_CheckForUpdates" <Button x:Uid="GeneralPage_CheckForUpdates"
Style="{StaticResource AccentButtonStyle}" Style="{StaticResource AccentButtonStyle}"
Foreground="White" Foreground="White"
Margin="{StaticResource SmallTopMargin}"
Command="{Binding CheckFoUpdatesEventHandler, Source={StaticResource eventViewModel}}" Command="{Binding CheckFoUpdatesEventHandler, Source={StaticResource eventViewModel}}"
/> />
@@ -129,37 +135,52 @@
</StackPanel> </StackPanel>
<StackPanel x:Name="SidePanel" <RelativePanel x:Name="SidePanel"
Orientation="Vertical"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Width="{StaticResource SidePanelWidth}" Width="{StaticResource SidePanelWidth}"
Grid.Column="1"> Grid.Column="1">
<StackPanel x:Name="DescriptionPanel">
<TextBlock x:Uid="GeneralPage_AboutPowerToysHeader" <TextBlock x:Uid="GeneralPage_AboutPowerToysHeader" x:Name="AboutTitle" Grid.ColumnSpan="2"
Style="{StaticResource SettingsGroupTitleStyle}" Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource XSmallBottomMargin}"/> Margin="{StaticResource XSmallBottomMargin}"/>
<TextBlock x:Uid="About_PowerToys"
TextWrapping="Wrap"
Grid.Row="1" />
</StackPanel>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/"> <Border x:Name="AboutImage"
<TextBlock x:Uid="General_Repository"/> CornerRadius="4"
</HyperlinkButton> Grid.Row="2"
MaxWidth="240"
HorizontalAlignment="Left"
Margin="{StaticResource SmallTopBottomMargin}"
RelativePanel.Below="DescriptionPanel">
<Image Source="https://aka.ms/powerToysPTSettingImage" />
</Border>
<StackPanel x:Name="LinksPanel"
RelativePanel.Below="AboutImage"
Orientation="Vertical" >
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"> <HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/">
<TextBlock x:Uid="GeneralPage_ReportAbug"/> <TextBlock x:Uid="General_Repository"/>
</HyperlinkButton> </HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"> <HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
<TextBlock x:Uid="GeneralPage_RequestAFeature_URL"/> <TextBlock x:Uid="GeneralPage_ReportAbug"/>
</HyperlinkButton> </HyperlinkButton>
<HyperlinkButton NavigateUri=" http://go.microsoft.com/fwlink/?LinkId=521839"> <HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
<TextBlock x:Uid="GeneralPage_PrivacyStatement_URL"/> <TextBlock x:Uid="GeneralPage_RequestAFeature_URL"/>
</HyperlinkButton> </HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/blob/master/NOTICE.md"> <HyperlinkButton NavigateUri=" http://go.microsoft.com/fwlink/?LinkId=521839">
<TextBlock x:Uid="OpenSource_Notice"/> <TextBlock x:Uid="GeneralPage_PrivacyStatement_URL"/>
</HyperlinkButton> </HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/blob/master/NOTICE.md">
</StackPanel> <TextBlock x:Uid="OpenSource_Notice"/>
</HyperlinkButton>
</StackPanel>
</RelativePanel>
</Grid> </Grid>
</Page> </Page>

View File

@@ -23,9 +23,11 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="1" /> <Setter Target="SidePanel.(Grid.Column)" Value="1"/>
<Setter Target="SidePanel.(Grid.Row)" Value="0" /> <Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}"/>
<Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}" /> <Setter Target="ImageResizerView.(Grid.Row)" Value="0" />
<Setter Target="LinksPanel.(RelativePanel.Below)" Value="AboutImage"/>
<Setter Target="AboutTitle.Visibility" Value="Visible" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="SmallLayout"> <VisualState x:Name="SmallLayout">
@@ -33,9 +35,13 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="0" /> <Setter Target="SidePanel.(Grid.Column)" Value="0"/>
<Setter Target="SidePanel.(Grid.Row)" Value="1" /> <Setter Target="SidePanel.Width" Value="500"/>
<Setter Target="SidePanel.Width" Value="Auto" /> <Setter Target="ImageResizerView.(Grid.Row)" Value="1" />
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage"/>
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage"/>
<Setter Target="AboutImage.Margin" Value="0,12,12,0"/>
<Setter Target="AboutTitle.Visibility" Value="Collapsed" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@@ -50,24 +56,17 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Vertical" x:Name="ImageResizerView"> <StackPanel Orientation="Vertical" x:Name="ImageResizerView">
<TextBlock x:Uid="ImageResizer_Description"
TextWrapping="Wrap"
/>
<ToggleSwitch x:Uid="ImageResizer_EnableToggle" <ToggleSwitch x:Uid="ImageResizer_EnableToggle"
Margin="{StaticResource MediumTopMargin}"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}"/> IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}"/>
<CustomControls:GroupTitleTextBlock <TextBlock x:Uid="ImageResizer_CustomSizes"
x:Uid="ImageResizer_CustomSizes" Style="{StaticResource SettingsGroupTitleStyle}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<ListView x:Name="ImagesSizesListView" <ListView x:Name="ImagesSizesListView"
ItemsSource="{Binding Sizes, Mode=TwoWay, Source={StaticResource ViewModel}}" ItemsSource="{Binding Sizes, Mode=TwoWay, Source={StaticResource ViewModel}}"
Padding="0" Padding="0"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
Margin="0"
SelectionMode="None"> SelectionMode="None">
<ListView.ItemContainerStyle> <ListView.ItemContainerStyle>
@@ -181,9 +180,9 @@
/> />
</StackPanel> </StackPanel>
<CustomControls:GroupTitleTextBlock <TextBlock x:Uid="Encoding"
x:Uid="Encoding" Style="{StaticResource SettingsGroupTitleStyle}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<ComboBox x:Uid="ImageResizer_FallBackEncoderText" <ComboBox x:Uid="ImageResizer_FallBackEncoderText"
SelectedIndex="{Binding Path=Encoder, Mode=TwoWay, Source={StaticResource ViewModel}}" SelectedIndex="{Binding Path=Encoder, Mode=TwoWay, Source={StaticResource ViewModel}}"
@@ -198,7 +197,10 @@
<ComboBoxItem x:Uid="ImageResizer_FallbackEncoder_GIF" /> <ComboBoxItem x:Uid="ImageResizer_FallbackEncoder_GIF" />
</ComboBox> </ComboBox>
<CustomControls:BodyTextBlock x:Uid="ImageResizer_Encoding" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> <TextBlock x:Uid="ImageResizer_Encoding"
Margin="{StaticResource SmallTopMargin}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<muxc:NumberBox Minimum="0" <muxc:NumberBox Minimum="0"
Maximum="100" Maximum="100"
Value="{ Binding Mode=TwoWay, Path=JPEGQualityLevel, Source={StaticResource ViewModel}}" Value="{ Binding Mode=TwoWay, Path=JPEGQualityLevel, Source={StaticResource ViewModel}}"
@@ -233,46 +235,60 @@
<ComboBoxItem x:Uid="ImageResizer_ENCODER_TIFF_Zip"/> <ComboBoxItem x:Uid="ImageResizer_ENCODER_TIFF_Zip"/>
</ComboBox> </ComboBox>
<CustomControls:GroupTitleTextBlock x:Uid="File" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> <TextBlock x:Uid="File"
Style="{StaticResource SettingsGroupTitleStyle}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<CustomControls:BodyTextBlock x:Uid="ImageResizer_FileFormatDescription" <TextBox Text="{x:Bind Mode=TwoWay, Path=ViewModel.FileName}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
Margin="{StaticResource SmallTopBottomMargin}"/>
<StackPanel Orientation="Horizontal" Margin="0,-5,0,-5">
<CustomControls:BodyTextBlock FontSize="12" FontWeight="Bold" Text="%1" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
<CustomControls:BodyTextBlock FontSize="12" Text=" - Original filename" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,-5,0,-5">
<CustomControls:BodyTextBlock FontSize="12" FontWeight="Bold" Text="%2" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
<CustomControls:BodyTextBlock FontSize="12" Text=" - Size name" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,-5,0,-5">
<CustomControls:BodyTextBlock FontSize="12" FontWeight="Bold" Text="%3" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
<CustomControls:BodyTextBlock FontSize="12" Text=" - Selected width" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,-5,0,-5">
<CustomControls:BodyTextBlock FontSize="12" FontWeight="Bold" Text="%4" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
<CustomControls:BodyTextBlock FontSize="12" Text=" - Selected height" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,-5,0,-5">
<CustomControls:BodyTextBlock FontSize="12" FontWeight="Bold" Text="%5" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
<CustomControls:BodyTextBlock FontSize="12" Text=" - Actual height" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,-5,0,-5">
<CustomControls:BodyTextBlock FontSize="12" FontWeight="Bold" Text="%6" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
<CustomControls:BodyTextBlock FontSize="12" Text=" - Actual width" IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
</StackPanel>
<TextBox x:Uid="ImageResizer_FilenameFormatHeader"
Text="{x:Bind Mode=TwoWay, Path=ViewModel.FileName}"
HorizontalAlignment="Left" HorizontalAlignment="Left"
MinWidth="240" MinWidth="240"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}">
<TextBox.Header>
<StackPanel Orientation="Horizontal">
<TextBlock x:Uid="ImageResizer_FilenameFormatHeader"
Margin="0,0,0,0"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<TextBlock Text="&#xE946;"
FontFamily="Segoe MDL2 Assets"
Margin="4,4,0,0"/>
</StackPanel>
</TextBox.Header>
<ToolTipService.ToolTip>
<StackPanel>
<TextBlock x:Uid="ImageResizer_FileFormatDescription"/>
<TextBlock Margin="{StaticResource SmallTopMargin}">
<Run Text="%1" FontWeight="Bold" />
<Run Text=" - Original filename" />
</TextBlock>
/> <TextBlock>
<Run Text="%2" FontWeight="Bold" />
<Run Text=" - Size name"/>
</TextBlock>
<TextBlock>
<Run Text="%3" FontWeight="Bold" />
<Run Text=" - Selected width"/>
</TextBlock>
<TextBlock>
<Run Text="%4" FontWeight="Bold" />
<Run Text=" - Selected height"/>
</TextBlock>
<TextBlock>
<Run Text="%5" FontWeight="Bold" />
<Run Text=" - Actual height"/>
</TextBlock>
<TextBlock>
<Run Text="%6" FontWeight="Bold" />
<Run Text=" - Actual width"/>
</TextBlock>
</StackPanel>
</ToolTipService.ToolTip>
</TextBox>
<CheckBox x:Uid="ImageResizer_UseOriginalDate" <CheckBox x:Uid="ImageResizer_UseOriginalDate"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
@@ -280,35 +296,48 @@
IsChecked="{Binding Mode=TwoWay, Path=KeepDateModified, Source={StaticResource ViewModel}}"/> IsChecked="{Binding Mode=TwoWay, Path=KeepDateModified, Source={StaticResource ViewModel}}"/>
</StackPanel> </StackPanel>
<StackPanel <RelativePanel x:Name="SidePanel"
x:Name="SidePanel" HorizontalAlignment="Left"
Orientation="Vertical" Width="{StaticResource SidePanelWidth}"
HorizontalAlignment="Left" Grid.Column="1">
Width="{StaticResource SidePanelWidth}" <StackPanel x:Name="DescriptionPanel">
Grid.Column="1"> <TextBlock x:Uid="About_ImageResizer" x:Name="AboutTitle" Grid.ColumnSpan="2"
Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource XSmallBottomMargin}"/>
<TextBlock x:Uid="ImageResizer_Description"
TextWrapping="Wrap"
Grid.Row="1" />
</StackPanel>
<TextBlock <Border x:Name="AboutImage"
x:Uid="About_ImageResizer" CornerRadius="4"
Style="{StaticResource SettingsGroupTitleStyle}" Grid.Row="2"
Margin="{StaticResource XSmallBottomMargin}"/> MaxWidth="240"
HorizontalAlignment="Left"
Margin="{StaticResource SmallTopBottomMargin}"
RelativePanel.Below="DescriptionPanel">
<Image Source="https://aka.ms/powerToysImageResizerSettingImage" />
</Border>
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_ImageResizer"> <StackPanel x:Name="LinksPanel"
<TextBlock x:Uid="Module_overview" /> RelativePanel.Below="AboutImage"
</HyperlinkButton> Orientation="Vertical" >
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_ImageResizer">
<TextBlock x:Uid="Module_overview" />
</HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
<TextBlock x:Uid="Give_Feedback" />
</HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"> <TextBlock
<TextBlock x:Uid="Give_Feedback" />
</HyperlinkButton>
<TextBlock
x:Uid="AttributionTitle" x:Uid="AttributionTitle"
Style="{StaticResource SettingsGroupTitleStyle}"/> Style="{StaticResource SettingsGroupTitleStyle}"/>
<HyperlinkButton <HyperlinkButton Margin="0,-3,0,0"
NavigateUri="https://github.com/bricelam/ImageResizer/"> NavigateUri="https://github.com/bricelam/ImageResizer/">
<TextBlock Text="Brice Lambson's ImageResizer" TextWrapping="Wrap" /> <TextBlock Text="Brice Lambson's ImageResizer" TextWrapping="Wrap" />
</HyperlinkButton> </HyperlinkButton>
</StackPanel> </StackPanel>
</RelativePanel>
</Grid> </Grid>
</Page> </Page>

View File

@@ -181,9 +181,11 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="1" /> <Setter Target="SidePanel.(Grid.Column)" Value="1"/>
<Setter Target="SidePanel.(Grid.Row)" Value="0" /> <Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}"/>
<Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}" /> <Setter Target="KeyboardManagerView.(Grid.Row)" Value="0" />
<Setter Target="LinksPanel.(RelativePanel.Below)" Value="AboutImage"/>
<Setter Target="AboutTitle.Visibility" Value="Visible" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="SmallLayout"> <VisualState x:Name="SmallLayout">
@@ -191,9 +193,13 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="0" /> <Setter Target="SidePanel.(Grid.Column)" Value="0"/>
<Setter Target="SidePanel.(Grid.Row)" Value="1" /> <Setter Target="SidePanel.Width" Value="500"/>
<Setter Target="SidePanel.Width" Value="Auto" /> <Setter Target="KeyboardManagerView.(Grid.Row)" Value="1" />
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage"/>
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage"/>
<Setter Target="AboutImage.Margin" Value="0,12,12,0"/>
<Setter Target="AboutTitle.Visibility" Value="Collapsed" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@@ -207,13 +213,9 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical" x:Name="KeyboardManagerView">
<TextBlock x:Uid="KeyboardManager_Description"
TextWrapping="Wrap"/>
<ToggleSwitch x:Uid="KeyboardManager_EnableToggle" <ToggleSwitch x:Uid="KeyboardManager_EnableToggle"
IsOn="{x:Bind Path=ViewModel.Enabled, Mode=TwoWay}" IsOn="{x:Bind Path=ViewModel.Enabled, Mode=TwoWay}"/>
Margin="{StaticResource MediumTopMargin}" />
<!--<TextBlock x:Uid="KeyboardManager_ConfigHeader" <!--<TextBlock x:Uid="KeyboardManager_ConfigHeader"
Style="{StaticResource SettingsGroupTitleStyle}"/> Style="{StaticResource SettingsGroupTitleStyle}"/>
@@ -228,12 +230,13 @@
<ComboBoxItem Content="Config-3"/> <ComboBoxItem Content="Config-3"/>
</ComboBox>--> </ComboBox>-->
<CustomControls:GroupTitleTextBlock x:Uid="KeyboardManager_RemapKeyboardHeader" <TextBlock x:Uid="KeyboardManager_RemapKeyboardHeader"
IsActive="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/> Style="{StaticResource SettingsGroupTitleStyle}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.Enabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<CustomControls:BodyTextBlock Text="Click below to remap keys to other keys or shortcuts." <TextBlock x:Uid="KeyboardManager_RemapKeyboardSubtitle"
IsActive="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}" Margin="{StaticResource SmallTopMargin}"
Margin="{StaticResource SmallTopMargin}"/> Foreground="{x:Bind Mode=OneWay, Path=ViewModel.Enabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<Button x:Uid="KeyboardManager_RemapKeyboardButton" <Button x:Uid="KeyboardManager_RemapKeyboardButton"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
@@ -267,11 +270,13 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>--> IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>-->
<CustomControls:GroupTitleTextBlock x:Uid="KeyboardManager_RemapShortcutsHeader" <TextBlock x:Uid="KeyboardManager_RemapShortcutsHeader"
IsActive="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/> Style="{StaticResource SettingsGroupTitleStyle}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.Enabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<CustomControls:BodyTextBlock Text="Click below to remap a shortcuts to other shortcuts or keys. Additionally, mappings can be targeted to specific applications as well." <TextBlock x:Uid="KeyboardManager_RemapShortcutsSubtitle"
IsActive="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/> Margin="{StaticResource SmallTopMargin}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.Enabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<Button x:Uid="KeyboardManager_RemapShortcutsButton" <Button x:Uid="KeyboardManager_RemapShortcutsButton"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
@@ -311,26 +316,41 @@
/>--> />-->
</StackPanel> </StackPanel>
<StackPanel <RelativePanel x:Name="SidePanel"
x:Name="SidePanel" HorizontalAlignment="Left"
Orientation="Vertical" Width="{StaticResource SidePanelWidth}"
HorizontalAlignment="Left" Grid.Column="1">
Width="{StaticResource SidePanelWidth}" <StackPanel x:Name="DescriptionPanel">
Grid.Column="1"> <TextBlock x:Uid="About_KeyboardManager"
x:Name="AboutTitle"
Grid.ColumnSpan="2"
Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource XSmallBottomMargin}"/>
<TextBlock x:Uid="KeyboardManager_Description"
TextWrapping="Wrap"
Grid.Row="1" />
</StackPanel>
<TextBlock <Border x:Name="AboutImage"
x:Uid="About_KeyboardManager" CornerRadius="4"
Style="{StaticResource SettingsGroupTitleStyle}" Grid.Row="2"
Margin="{StaticResource XSmallBottomMargin}" MaxWidth="240"
Foreground="{Binding Mode=TwoWay, Path=TextColor}"/> HorizontalAlignment="Left"
Margin="{StaticResource SmallTopBottomMargin}"
RelativePanel.Below="DescriptionPanel">
<Image Source="https://aka.ms/powerToysKBMSettingImage" />
</Border>
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_KeyboardManager"> <StackPanel x:Name="LinksPanel"
<TextBlock x:Uid="Module_overview" /> RelativePanel.Below="AboutImage"
</HyperlinkButton> Orientation="Vertical" >
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_KeyboardManager">
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"> <TextBlock x:Uid="Module_overview" />
<TextBlock x:Uid="Give_Feedback" /> </HyperlinkButton>
</HyperlinkButton> <HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
</StackPanel> <TextBlock x:Uid="Give_Feedback" />
</HyperlinkButton>
</StackPanel>
</RelativePanel>
</Grid> </Grid>
</Page> </Page>

View File

@@ -19,9 +19,11 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="1" /> <Setter Target="SidePanel.(Grid.Column)" Value="1"/>
<Setter Target="SidePanel.(Grid.Row)" Value="0" /> <Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}"/>
<Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}" /> <Setter Target="PowerToysRunView.(Grid.Row)" Value="0" />
<Setter Target="LinksPanel.(RelativePanel.Below)" Value="AboutImage"/>
<Setter Target="AboutTitle.Visibility" Value="Visible" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="SmallLayout"> <VisualState x:Name="SmallLayout">
@@ -29,9 +31,13 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="0" /> <Setter Target="SidePanel.(Grid.Column)" Value="0"/>
<Setter Target="SidePanel.(Grid.Row)" Value="1" /> <Setter Target="SidePanel.Width" Value="500"/>
<Setter Target="SidePanel.Width" Value="Auto" /> <Setter Target="PowerToysRunView.(Grid.Row)" Value="1" />
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage"/>
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage"/>
<Setter Target="AboutImage.Margin" Value="0,12,12,0"/>
<Setter Target="AboutTitle.Visibility" Value="Collapsed" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@@ -45,56 +51,20 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Vertical" x:Name="PowerToysRunView">
<TextBlock x:Uid="PowerLauncher_Description"
TextWrapping="Wrap"/>
<ToggleSwitch x:Uid="PowerLauncher_EnablePowerLauncher" <ToggleSwitch x:Uid="PowerLauncher_EnablePowerLauncher"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.EnablePowerLauncher}" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.EnablePowerLauncher}"/>
Margin="{StaticResource MediumTopMargin}"/>
<CustomControls:GroupTitleTextBlock x:Uid="PowerLauncher_SearchResults" <TextBlock x:Uid="PowerLauncher_Shortcuts"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"/> Style="{StaticResource SettingsGroupTitleStyle}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<!--<ComboBox x:Uid="PowerLauncher_SearchResultPreference"
MinWidth="320"
Margin="{StaticResource SmallTopMargin}"
ItemsSource="{Binding searchResultPreferencesOptions}"
SelectedItem="{Binding Mode=TwoWay, Path=SelectedSearchResultPreference}"
SelectedValuePath="Item2"
DisplayMemberPath="Item1"
IsEnabled="False"
/>
<ComboBox x:Uid="PowerLauncher_SearchTypePreference"
MinWidth="320"
Margin="{StaticResource SmallTopMargin}"
ItemsSource="{Binding searchTypePreferencesOptions}"
SelectedItem="{Binding Mode=TwoWay, Path=SelectedSearchTypePreference}"
SelectedValuePath="Item2"
DisplayMemberPath="Item1"
IsEnabled="False"
/>-->
<CustomControls:BodyTextBlock x:Uid="PowerLauncher_MaximumNumberOfResults"
Margin="{StaticResource SmallTopMargin}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"/>
<muxc:NumberBox Value="{Binding Mode=TwoWay, Path=MaximumNumberOfResults}"
Width="240"
SpinButtonPlacementMode="Compact"
HorizontalAlignment="Left"
Minimum="1"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"/>
<CustomControls:GroupTitleTextBlock x:Uid="PowerLauncher_Shortcuts"
HorizontalAlignment="Left"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"/>
<CustomControls:HotkeySettingsControl x:Uid="PowerLauncher_OpenPowerLauncher" <CustomControls:HotkeySettingsControl x:Uid="PowerLauncher_OpenPowerLauncher"
Width="240" Width="240"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
HotkeySettings="{x:Bind Path=ViewModel.OpenPowerLauncher, Mode=TwoWay}" HotkeySettings="{x:Bind Path=ViewModel.OpenPowerLauncher, Mode=TwoWay}"
Keys="Win, Ctrl, Alt, Shift"
Enabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"/> Enabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"/>
<!--<Custom:HotkeySettingsControl x:Uid="PowerLauncher_OpenFileLocation" <!--<Custom:HotkeySettingsControl x:Uid="PowerLauncher_OpenFileLocation"
Width="320" Width="320"
@@ -108,6 +78,7 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
HotkeySettings="{Binding Path=ViewModel.CopyPathLocation, Mode=TwoWay}" HotkeySettings="{Binding Path=ViewModel.CopyPathLocation, Mode=TwoWay}"
Keys="Win, Ctrl, Alt, Shift"
IsEnabled="False" IsEnabled="False"
/> />
<Custom:HotkeySettingsControl x:Uid="PowerLauncher_OpenConsole" <Custom:HotkeySettingsControl x:Uid="PowerLauncher_OpenConsole"
@@ -115,6 +86,7 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
HotkeySettings="{Binding Path=ViewModel.OpenConsole, Mode=TwoWay}" HotkeySettings="{Binding Path=ViewModel.OpenConsole, Mode=TwoWay}"
Keys="Win, Ctrl, Alt, Shift"
IsEnabled="False" IsEnabled="False"
/>--> />-->
@@ -136,6 +108,42 @@
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
/> />
<TextBlock x:Uid="PowerLauncher_SearchResults"
Style="{StaticResource SettingsGroupTitleStyle}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<!--<ComboBox x:Uid="PowerLauncher_SearchResultPreference"
MinWidth="320"
Margin="{StaticResource SmallTopMargin}"
ItemsSource="{Binding searchResultPreferencesOptions}"
SelectedItem="{Binding Mode=TwoWay, Path=SelectedSearchResultPreference}"
SelectedValuePath="Item2"
DisplayMemberPath="Item1"
IsEnabled="False"
/>
<ComboBox x:Uid="PowerLauncher_SearchTypePreference"
MinWidth="320"
Margin="{StaticResource SmallTopMargin}"
ItemsSource="{Binding searchTypePreferencesOptions}"
SelectedItem="{Binding Mode=TwoWay, Path=SelectedSearchTypePreference}"
SelectedValuePath="Item2"
DisplayMemberPath="Item1"
IsEnabled="False"
/>-->
<TextBlock x:Uid="PowerLauncher_MaximumNumberOfResults"
Margin="{StaticResource SmallTopMargin}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<muxc:NumberBox Value="{Binding Mode=TwoWay, Path=MaximumNumberOfResults}"
Width="240"
SpinButtonPlacementMode="Compact"
HorizontalAlignment="Left"
Minimum="1"
Margin="{StaticResource HeaderTextTopMargin}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"/>
<CheckBox x:Uid="PowerLauncher_ClearInputOnLaunch" <CheckBox x:Uid="PowerLauncher_ClearInputOnLaunch"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ClearInputOnLaunch}" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ClearInputOnLaunch}"
@@ -149,39 +157,53 @@
/> />
</StackPanel> </StackPanel>
<StackPanel
x:Name="SidePanel"
Orientation="Vertical"
HorizontalAlignment="Left"
Width="{StaticResource SidePanelWidth}"
Grid.Column="1">
<TextBlock <RelativePanel x:Name="SidePanel"
x:Uid="About_PowerLauncher" HorizontalAlignment="Left"
Style="{StaticResource SettingsGroupTitleStyle}" Width="{StaticResource SidePanelWidth}"
Margin="{StaticResource XSmallBottomMargin}" Grid.Column="1">
Foreground="{ Binding Mode=TwoWay, Path=TextColor}"/> <StackPanel x:Name="DescriptionPanel">
<TextBlock x:Uid="About_PowerLauncher" x:Name="AboutTitle" Grid.ColumnSpan="2"
Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource XSmallBottomMargin}"/>
<TextBlock x:Uid="PowerLauncher_Description"
TextWrapping="Wrap"
Grid.Row="1" />
</StackPanel>
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_PowerToysRun"> <Border x:Name="AboutImage"
<TextBlock x:Uid="Module_overview" /> CornerRadius="4"
</HyperlinkButton> Grid.Row="2"
MaxWidth="240"
HorizontalAlignment="Left"
Margin="{StaticResource SmallTopBottomMargin}"
RelativePanel.Below="DescriptionPanel">
<Image Source="https://aka.ms/powerToysPowerLauncherSettingImage" />
</Border>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"> <StackPanel x:Name="LinksPanel"
<TextBlock x:Uid="Give_Feedback" /> RelativePanel.Below="AboutImage"
</HyperlinkButton> Orientation="Vertical" >
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_PowerToysRun">
<TextBlock x:Uid="Module_overview" />
</HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
<TextBlock x:Uid="Give_Feedback" />
</HyperlinkButton>
<TextBlock <TextBlock x:Uid="AttributionTitle"
x:Uid="AttributionTitle" Style="{StaticResource SettingsGroupTitleStyle}"
Style="{StaticResource SettingsGroupTitleStyle}" Foreground="{ Binding Mode=TwoWay, Path=TextColor}"/>
Foreground="{ Binding Mode=TwoWay, Path=TextColor}"/>
<HyperlinkButton NavigateUri="https://github.com/Wox-launcher/Wox/"> <HyperlinkButton Margin="0,-3,0,0" NavigateUri="https://github.com/Wox-launcher/Wox/">
<TextBlock Text="Wox"/> <TextBlock Text="Wox"/>
</HyperlinkButton> </HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/betsegaw/windowwalker/"> <HyperlinkButton NavigateUri="https://github.com/betsegaw/windowwalker/">
<TextBlock Text="Beta Tadele's Window Walker" /> <TextBlock Text="Beta Tadele's Window Walker" />
</HyperlinkButton> </HyperlinkButton>
</StackPanel>
</StackPanel>
</RelativePanel>
</Grid> </Grid>
</Page> </Page>

View File

@@ -15,9 +15,11 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="1" /> <Setter Target="SidePanel.(Grid.Column)" Value="1"/>
<Setter Target="SidePanel.(Grid.Row)" Value="0" /> <Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}"/>
<Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}" /> <Setter Target="PowerPreviewSettingsView.(Grid.Row)" Value="0" />
<Setter Target="LinksPanel.(RelativePanel.Below)" Value="AboutImage"/>
<Setter Target="AboutTitle.Visibility" Value="Visible" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="SmallLayout"> <VisualState x:Name="SmallLayout">
@@ -25,9 +27,13 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="0" /> <Setter Target="SidePanel.(Grid.Column)" Value="0"/>
<Setter Target="SidePanel.(Grid.Row)" Value="1" /> <Setter Target="SidePanel.Width" Value="500"/>
<Setter Target="SidePanel.Width" Value="Auto" /> <Setter Target="PowerPreviewSettingsView.(Grid.Row)" Value="1" />
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage"/>
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage"/>
<Setter Target="AboutImage.Margin" Value="0,12,12,0"/>
<Setter Target="AboutTitle.Visibility" Value="Collapsed" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@@ -43,11 +49,8 @@
<StackPanel Orientation="Vertical" <StackPanel Orientation="Vertical"
x:Name="PowerPreviewSettingsView"> x:Name="PowerPreviewSettingsView">
<TextBlock x:Uid="FileExplorerPreview_Description"
TextWrapping="Wrap"/>
<ToggleSwitch x:Uid="FileExplorerPreview_ToggleSwitch_Preview_SVG" <ToggleSwitch x:Uid="FileExplorerPreview_ToggleSwitch_Preview_SVG"
Margin="{StaticResource MediumTopMargin}"
IsOn="{Binding Mode=TwoWay, Path=SVGRenderIsEnabled}" /> IsOn="{Binding Mode=TwoWay, Path=SVGRenderIsEnabled}" />
<ToggleSwitch x:Uid="FileExplorerPreview_ToggleSwitch_SVG_Thumbnail" <ToggleSwitch x:Uid="FileExplorerPreview_ToggleSwitch_SVG_Thumbnail"
@@ -59,23 +62,39 @@
IsOn="{Binding Mode=TwoWay, Path=MDRenderIsEnabled}" /> IsOn="{Binding Mode=TwoWay, Path=MDRenderIsEnabled}" />
</StackPanel> </StackPanel>
<StackPanel x:Name="SidePanel" <RelativePanel x:Name="SidePanel"
Orientation="Vertical"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Width="{StaticResource SidePanelWidth}" Width="{StaticResource SidePanelWidth}"
Grid.Column="1"> Grid.Column="1">
<StackPanel x:Name="DescriptionPanel">
<TextBlock x:Uid="About_FileExplorerPreview" <TextBlock x:Uid="About_FileExplorerPreview" x:Name="AboutTitle" Grid.ColumnSpan="2"
Style="{StaticResource SettingsGroupTitleStyle}" Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource XSmallBottomMargin}"/> Margin="{StaticResource XSmallBottomMargin}"/>
<TextBlock x:Uid="FileExplorerPreview_Description"
TextWrapping="Wrap"
Grid.Row="1" />
</StackPanel>
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_FileExplorerAddOns"> <Border x:Name="AboutImage"
<TextBlock x:Uid="Module_overview" /> CornerRadius="4"
</HyperlinkButton> Grid.Row="2"
MaxWidth="240"
HorizontalAlignment="Left"
Margin="{StaticResource SmallTopBottomMargin}"
RelativePanel.Below="DescriptionPanel">
<Image Source="https://aka.ms/powerToysPowerPreviewSettingImage" />
</Border>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"> <StackPanel x:Name="LinksPanel"
<TextBlock x:Uid="Give_Feedback" /> RelativePanel.Below="AboutImage"
</HyperlinkButton> Orientation="Vertical" >
</StackPanel> <HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_FileExplorerAddOns">
<TextBlock x:Uid="Module_overview" />
</HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
<TextBlock x:Uid="Give_Feedback" />
</HyperlinkButton>
</StackPanel>
</RelativePanel>
</Grid> </Grid>
</Page> </Page>

View File

@@ -17,9 +17,11 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="1" /> <Setter Target="SidePanel.(Grid.Column)" Value="1"/>
<Setter Target="SidePanel.(Grid.Row)" Value="0" /> <Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}"/>
<Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}" /> <Setter Target="PowerRenameSettingsView.(Grid.Row)" Value="0" />
<Setter Target="LinksPanel.(RelativePanel.Below)" Value="AboutImage"/>
<Setter Target="AboutTitle.Visibility" Value="Visible" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="SmallLayout"> <VisualState x:Name="SmallLayout">
@@ -27,9 +29,13 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="0" /> <Setter Target="SidePanel.(Grid.Column)" Value="0"/>
<Setter Target="SidePanel.(Grid.Row)" Value="1" /> <Setter Target="SidePanel.Width" Value="500"/>
<Setter Target="SidePanel.Width" Value="Auto" /> <Setter Target="PowerRenameSettingsView.(Grid.Row)" Value="1" />
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage"/>
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage"/>
<Setter Target="AboutImage.Margin" Value="0,12,12,0"/>
<Setter Target="AboutTitle.Visibility" Value="Collapsed" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@@ -45,18 +51,13 @@
<StackPanel Orientation="Vertical" <StackPanel Orientation="Vertical"
x:Name="PowerRenameSettingsView"> x:Name="PowerRenameSettingsView">
<TextBlock x:Uid="PowerRename_Description"
TextWrapping="Wrap"/>
<ToggleSwitch x:Uid="PowerRename_Toggle_Enable" <ToggleSwitch x:Uid="PowerRename_Toggle_Enable"
Margin="{StaticResource MediumTopMargin}"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}"
/> />
<CustomControls:GroupTitleTextBlock <TextBlock x:Uid="PowerRename_ShellIntegration"
x:Uid="PowerRename_ShellIntegration" Style="{StaticResource SettingsGroupTitleStyle}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
/>
<ToggleSwitch x:Uid="PowerRename_Toggle_EnableOnContextMenu" <ToggleSwitch x:Uid="PowerRename_Toggle_EnableOnContextMenu"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
@@ -70,18 +71,20 @@
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
/> />
<CustomControls:GroupTitleTextBlock x:Uid="PowerRename_AutoCompleteHeader" <TextBlock x:Uid="PowerRename_AutoCompleteHeader"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> Style="{StaticResource SettingsGroupTitleStyle}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<ToggleSwitch x:Uid="PowerRename_Toggle_AutoComplete" <CheckBox x:Uid="PowerRename_Toggle_AutoComplete"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.MRUEnabled}" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.MRUEnabled}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
/> />
<CustomControls:BodyTextBlock x:Uid="PowerRename_Toggle_MaxDispListNum" <TextBlock x:Uid="PowerRename_Toggle_MaxDispListNum"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<muxc:NumberBox SpinButtonPlacementMode="Compact" <muxc:NumberBox SpinButtonPlacementMode="Compact"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="{StaticResource HeaderTextTopMargin}" Margin="{StaticResource HeaderTextTopMargin}"
@@ -91,42 +94,56 @@
Maximum="20" Maximum="20"
IsEnabled="{ x:Bind Mode=OneWay, Path=ViewModel.GlobalAndMruEnabled}"/> IsEnabled="{ x:Bind Mode=OneWay, Path=ViewModel.GlobalAndMruEnabled}"/>
<ToggleSwitch x:Uid="PowerRename_Toggle_RestoreFlagsOnLaunch" <CheckBox x:Uid="PowerRename_Toggle_RestoreFlagsOnLaunch"
Margin="0, 17, 0, 0" Margin="0, 17, 0, 0"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.RestoreFlagsOnLaunch}" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.RestoreFlagsOnLaunch}"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
</StackPanel> </StackPanel>
<StackPanel x:Name="SidePanel" <RelativePanel x:Name="SidePanel"
Orientation="Vertical"
HorizontalAlignment="Left" HorizontalAlignment="Left"
Width="{StaticResource SidePanelWidth}" Width="{StaticResource SidePanelWidth}"
Grid.Column="1"> Grid.Column="1">
<StackPanel x:Name="DescriptionPanel">
<TextBlock x:Uid="About_PowerRename" <TextBlock x:Uid="About_PowerRename" x:Name="AboutTitle" Grid.ColumnSpan="2"
Style="{StaticResource SettingsGroupTitleStyle}" Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource XSmallBottomMargin}" Margin="{StaticResource XSmallBottomMargin}"/>
/> <TextBlock x:Uid="PowerRename_Description"
TextWrapping="Wrap"
Grid.Row="1" />
</StackPanel>
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_PowerRename"> <Border x:Name="AboutImage"
<TextBlock x:Uid="Module_overview" /> CornerRadius="4"
</HyperlinkButton> Grid.Row="2"
MaxWidth="240"
HorizontalAlignment="Left"
Margin="{StaticResource SmallTopBottomMargin}"
RelativePanel.Below="DescriptionPanel">
<Image Source="https://aka.ms/powerToysPowerRenameSettingImage" />
</Border>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"> <StackPanel x:Name="LinksPanel"
<TextBlock x:Uid="Give_Feedback" /> RelativePanel.Below="AboutImage"
</HyperlinkButton> Orientation="Vertical" >
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_PowerRename">
<TextBlock x:Uid="Module_overview" />
</HyperlinkButton>
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
<TextBlock x:Uid="Give_Feedback" />
</HyperlinkButton>
<TextBlock
<TextBlock
x:Uid="AttributionTitle" x:Uid="AttributionTitle"
Style="{StaticResource SettingsGroupTitleStyle}" Style="{StaticResource SettingsGroupTitleStyle}"
/> Foreground="{ Binding Mode=TwoWay, Path=TextColor}"/>
<HyperlinkButton <HyperlinkButton NavigateUri="https://github.com/chrdavis/SmartRename" Margin="0,-3,0,0">
NavigateUri="https://github.com/chrdavis/SmartRename"> <TextBlock Text="Chris Davis's SmartRenamer" TextWrapping="Wrap" />
<TextBlock Text="Chris Davis's SmartRenamer" TextWrapping="Wrap" /> </HyperlinkButton>
</HyperlinkButton>
</StackPanel> </StackPanel>
</RelativePanel>
</Grid> </Grid>
</Page> </Page>

View File

@@ -27,18 +27,8 @@
IsSettingsVisible="False" IsSettingsVisible="False"
IsPaneToggleButtonVisible="False" IsPaneToggleButtonVisible="False"
PaneDisplayMode="Left" PaneDisplayMode="Left"
Background="{ThemeResource SystemControlBackgroundAltHighBrush}"> Background="{ThemeResource SystemControlBackgroundAltHighBrush}"
<!-- <winui:NavigationView.PaneHeader> >
TODO:
PowerToys needs to be string
Think maybe about svg logo here
Margin should be style
<TextBlock Margin="12, 24, 0, 6" Style="{StaticResource SubheaderTextBlockStyle}" FontWeight="Bold">PowerToys</TextBlock>
</winui:NavigationView.PaneHeader> -->
<winui:NavigationView.MenuItems> <winui:NavigationView.MenuItems>
<winui:NavigationViewItem x:Uid="Shell_General" helpers:NavHelper.NavigateTo="views:GeneralPage"> <winui:NavigationViewItem x:Uid="Shell_General" helpers:NavHelper.NavigateTo="views:GeneralPage">
<winui:NavigationViewItem.Icon> <winui:NavigationViewItem.Icon>
@@ -61,7 +51,7 @@
<winui:NavigationViewItem x:Uid="Shell_PowerPreview" helpers:NavHelper.NavigateTo="views:PowerPreviewPage" > <winui:NavigationViewItem x:Uid="Shell_PowerPreview" helpers:NavHelper.NavigateTo="views:PowerPreviewPage" >
<winui:NavigationViewItem.Icon> <winui:NavigationViewItem.Icon>
<PathIcon Data="M2048 1792h-384v128h-384v-128H768v128H384v-128H0V256q0-27 10-50t27-40 41-28 50-10h480q45 0 77 9t58 24 46 31 40 31 44 23 55 10h992q27 0 50 10t40 27 28 41 10 50v1408zM128 256v128h480q24 0 42-4t33-13 29-20 32-27q-17-15-31-26t-30-20-33-13-42-5H128zm1152 1408v-256H768v256h512zm256 128v-576q0-26-19-45t-45-19H576q-26 0-45 19t-19 45v576h128v-512h768v512h128zm384-1408H928q-31 0-54 9t-44 24-41 31-46 31-57 23-78 10H128v1152h256v-448q0-40 15-75t41-61 61-41 75-15h896q40 0 75 15t61 41 41 61 15 75v448h256V384z" ></PathIcon> <FontIcon Glyph="&#xEC50;"/>
</winui:NavigationViewItem.Icon> </winui:NavigationViewItem.Icon>
</winui:NavigationViewItem> </winui:NavigationViewItem>

View File

@@ -23,9 +23,11 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource WideLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="1" /> <Setter Target="SidePanel.(Grid.Column)" Value="1"/>
<Setter Target="SidePanel.(Grid.Row)" Value="0" /> <Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}"/>
<Setter Target="SidePanel.Width" Value="{StaticResource SidePanelWidth}" /> <Setter Target="ShortCutGuideView.(Grid.Row)" Value="0" />
<Setter Target="LinksPanel.(RelativePanel.Below)" Value="AboutImage"/>
<Setter Target="AboutTitle.Visibility" Value="Visible" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="SmallLayout"> <VisualState x:Name="SmallLayout">
@@ -33,9 +35,13 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" /> <AdaptiveTrigger MinWindowWidth="{StaticResource SmallLayoutMinWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
<VisualState.Setters> <VisualState.Setters>
<Setter Target="SidePanel.(Grid.Column)" Value="0" /> <Setter Target="SidePanel.(Grid.Column)" Value="0"/>
<Setter Target="SidePanel.(Grid.Row)" Value="1" /> <Setter Target="SidePanel.Width" Value="500"/>
<Setter Target="SidePanel.Width" Value="Auto" /> <Setter Target="ShortCutGuideView.(Grid.Row)" Value="1" />
<Setter Target="LinksPanel.(RelativePanel.RightOf)" Value="AboutImage"/>
<Setter Target="LinksPanel.(RelativePanel.AlignTopWith)" Value="AboutImage"/>
<Setter Target="AboutImage.Margin" Value="0,12,12,0"/>
<Setter Target="AboutTitle.Visibility" Value="Collapsed" />
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@@ -49,20 +55,17 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Vertical" x:Name="ShortCutGuideView"> <StackPanel Orientation="Vertical" x:Name="ShortCutGuideView">
<TextBlock x:Uid="ShortcutGuide_Description"
TextWrapping="Wrap"
/>
<ToggleSwitch x:Uid="ShortcutGuide_Enable" <ToggleSwitch x:Uid="ShortcutGuide_Enable"
IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}" IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.IsEnabled}"/>
Margin="{StaticResource MediumTopMargin}"/>
<CustomControls:GroupTitleTextBlock x:Uid="ShortcutGuide_Appearance_Behavior" <TextBlock x:Uid="ShortcutGuide_Appearance_Behavior"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> Style="{StaticResource SettingsGroupTitleStyle}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<TextBlock x:Uid="ShortcutGuide_PressTime"
Margin="{StaticResource SmallTopMargin}"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<CustomControls:BodyTextBlock x:Uid="ShortcutGuide_PressTime"
Margin="{StaticResource SmallTopMargin}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
<muxc:NumberBox Minimum="100" <muxc:NumberBox Minimum="100"
SpinButtonPlacementMode="Compact" SpinButtonPlacementMode="Compact"
HorizontalAlignment="Left" HorizontalAlignment="Left"
@@ -82,16 +85,20 @@
IsThumbToolTipEnabled="False" IsThumbToolTipEnabled="False"
HorizontalAlignment="Left" HorizontalAlignment="Left"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/>
<CustomControls:BodyTextBlock Text="{x:Bind Mode=OneWay, Path=ViewModel.OverlayOpacity, Converter={StaticResource StringFormatConverter}, ConverterParameter=' {0}%' }"
VerticalAlignment="Center" <TextBlock
FontSize="16" Text="{x:Bind Mode=OneWay, Path=ViewModel.OverlayOpacity, Converter={StaticResource StringFormatConverter}, ConverterParameter=' {0}%' }"
Margin="0,21,0,0" VerticalAlignment="Center"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> FontSize="16"
FontWeight="SemiBold"
Margin="0,16,0,0"
Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
</StackPanel> </StackPanel>
<CustomControls:BodyTextBlock x:Uid="ShortcutGuide_Theme" <TextBlock x:Uid="ShortcutGuide_Theme"
Margin="{StaticResource SmallTopMargin}" Margin="{StaticResource SmallTopMargin}"
IsActive="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"/> Foreground="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled, Converter={StaticResource ModuleEnabledToForegroundConverter}}"/>
<muxc:RadioButtons IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}" <muxc:RadioButtons IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}"
Margin="{StaticResource HeaderTextTopMargin}"> Margin="{StaticResource HeaderTextTopMargin}">
@@ -101,26 +108,41 @@
</muxc:RadioButtons> </muxc:RadioButtons>
</StackPanel> </StackPanel>
<StackPanel <RelativePanel x:Name="SidePanel"
x:Name="SidePanel" HorizontalAlignment="Left"
Orientation="Vertical" Width="{StaticResource SidePanelWidth}"
HorizontalAlignment="Left" Grid.Column="1">
Width="{StaticResource SidePanelWidth}" <StackPanel x:Name="DescriptionPanel">
Grid.Column="1"> <TextBlock x:Uid="About_ShortcutGuide"
x:Name="AboutTitle"
Grid.ColumnSpan="2"
Style="{StaticResource SettingsGroupTitleStyle}"
Margin="{StaticResource XSmallBottomMargin}"/>
<TextBlock x:Uid="ShortcutGuide_Description"
TextWrapping="Wrap"
Grid.Row="1" />
</StackPanel>
<TextBlock <Border x:Name="AboutImage"
x:Uid="About_ShortcutGuide" CornerRadius="4"
Style="{StaticResource SettingsGroupTitleStyle}" Grid.Row="2"
Margin="{StaticResource XSmallBottomMargin}" MaxWidth="240"
/> HorizontalAlignment="Left"
Margin="{StaticResource SmallTopBottomMargin}"
RelativePanel.Below="DescriptionPanel">
<Image Source="https://aka.ms/powerToysShortcutGuideSettingImage" />
</Border>
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_ShortcutGuide"> <StackPanel x:Name="LinksPanel"
<TextBlock x:Uid="Module_overview"/> RelativePanel.Below="AboutImage"
</HyperlinkButton> Orientation="Vertical" >
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_ShortcutGuide">
<HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues"> <TextBlock x:Uid="Module_overview" />
<TextBlock x:Uid="Give_Feedback" /> </HyperlinkButton>
</HyperlinkButton> <HyperlinkButton NavigateUri="https://github.com/microsoft/PowerToys/issues">
</StackPanel> <TextBlock x:Uid="Give_Feedback" />
</HyperlinkButton>
</StackPanel>
</RelativePanel>
</Grid> </Grid>
</Page> </Page>