mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
[Settings] New Settings controls, XAML formatting and cleanup (#21317)
* Awake * Always On Top * ColorPicker * FancyZones * FancyZones * Hosts file editor * ImageResizer * Update ImageResizerPage.xaml * KBM * General * Update MeasureToolPage.xaml * Mouse utils * PowerAccent * Run * PowerOCR * File preview * PowerRename * Shortcut Guide * VCM * XAML styler * Update ShellPage.xaml * XAML formatting and cleanup * Moving converters * Update App.xaml * XAML formatting * XAML formatting * Fixes * XAML formatting * Image resizer updates * Color picker page and margin tweaks * Update PowerLauncherPage.xaml * Tweaks based on Jay's feedback * Resolve conflicts * Add labs source to unit tests * Fix feedback * Fix KBM bug * Infobar fix * Fixes * Resolve conflicts * Add converter
This commit is contained in:
@@ -1,63 +1,63 @@
|
||||
<Page
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerLauncherPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ViewModels="using:Microsoft.PowerToys.Settings.UI.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
|
||||
xmlns:i="using:Microsoft.Xaml.Interactivity"
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.PowerLauncherPage"
|
||||
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters"
|
||||
mc:Ignorable="d"
|
||||
AutomationProperties.LandmarkType="Main">
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:i="using:Microsoft.Xaml.Interactivity"
|
||||
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
|
||||
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="using:CommunityToolkit.WinUI.UI"
|
||||
AutomationProperties.LandmarkType="Main"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Page.Resources>
|
||||
<converters:BoolToObjectConverter x:Key="BoolToVisibilityConverter" TrueValue="Visible" FalseValue="Collapsed"/>
|
||||
<converters:BoolNegationConverter x:Key="BoolNegationConverter"/>
|
||||
</Page.Resources>
|
||||
|
||||
<controls:SettingsPageControl x:Uid="PowerLauncher"
|
||||
ModuleImageSource="ms-appx:///Assets/Modules/PowerLauncher.png">
|
||||
<controls:SettingsPageControl
|
||||
x:Uid="PowerLauncher"
|
||||
ModuleImageSource="ms-appx:///Assets/Modules/PowerLauncher.png">
|
||||
<controls:SettingsPageControl.ModuleContent>
|
||||
|
||||
<StackPanel Orientation="Vertical">
|
||||
<controls:Setting x:Uid="PowerLauncher_EnablePowerLauncher" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
|
||||
<controls:Setting.Icon>
|
||||
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerToysRun.png" ShowAsMonochrome="False" />
|
||||
</controls:Setting.Icon>
|
||||
<controls:Setting.ActionContent>
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.EnablePowerLauncher, Mode=TwoWay}" x:Uid="ToggleSwitch"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
<InfoBar x:Uid="GPO_IsSettingForced"
|
||||
Severity="Informational"
|
||||
<labs:SettingsCard
|
||||
x:Uid="QuickAccent_EnableQuickAccent"
|
||||
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsPowerToysRun.png}"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured, Converter={StaticResource BoolNegationConverter}}">
|
||||
<ToggleSwitch
|
||||
x:Uid="ToggleSwitch"
|
||||
IsOn="{x:Bind ViewModel.EnablePowerLauncher, Mode=TwoWay}" />
|
||||
</labs:SettingsCard>
|
||||
<InfoBar
|
||||
x:Uid="GPO_IsSettingForced"
|
||||
IsClosable="False"
|
||||
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
|
||||
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}" />
|
||||
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
|
||||
Severity="Informational" />
|
||||
|
||||
<controls:SettingsGroup x:Uid="Shortcut" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||
<controls:SettingExpander IsExpanded="True">
|
||||
<controls:SettingExpander.Header>
|
||||
<controls:Setting x:Uid="Activation_Shortcut" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}">
|
||||
<controls:Setting.ActionContent>
|
||||
<controls:ShortcutControl HotkeySettings="{x:Bind Path=ViewModel.OpenPowerLauncher, Mode=TwoWay}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
</controls:SettingExpander.Header>
|
||||
<controls:SettingExpander.Content>
|
||||
<StackPanel>
|
||||
<controls:CheckBoxWithDescriptionControl x:Uid="PowerLauncher_UseCentralizedKeyboardHook"
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.UseCentralizedKeyboardHook}"
|
||||
Margin="{StaticResource ExpanderSettingMargin}"/>
|
||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||
<CheckBox x:Uid="PowerLauncher_IgnoreHotkeysInFullScreen"
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.IgnoreHotkeysInFullScreen}"
|
||||
Margin="{StaticResource ExpanderSettingMargin}" />
|
||||
</StackPanel>
|
||||
</controls:SettingExpander.Content>
|
||||
</controls:SettingExpander>
|
||||
<controls:SettingsGroup
|
||||
x:Uid="Shortcut"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||
<labs:SettingsExpander
|
||||
x:Uid="Activation_Shortcut"
|
||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
|
||||
Glyph=}"
|
||||
IsExpanded="True">
|
||||
<controls:ShortcutControl
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
HotkeySettings="{x:Bind Path=ViewModel.OpenPowerLauncher, Mode=TwoWay}" />
|
||||
<labs:SettingsExpander.Items>
|
||||
<labs:SettingsCard ContentAlignment="Left">
|
||||
<controls:CheckBoxWithDescriptionControl
|
||||
x:Uid="PowerLauncher_UseCentralizedKeyboardHook"
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.UseCentralizedKeyboardHook}" />
|
||||
</labs:SettingsCard>
|
||||
<labs:SettingsCard ContentAlignment="Left">
|
||||
<CheckBox
|
||||
x:Uid="PowerLauncher_IgnoreHotkeysInFullScreen"
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.IgnoreHotkeysInFullScreen}" />
|
||||
</labs:SettingsCard>
|
||||
</labs:SettingsExpander.Items>
|
||||
</labs:SettingsExpander>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
IsEnabled="False"
|
||||
/>-->
|
||||
|
||||
<!--<CheckBox x:Uid="PowerLauncher_OverrideWinRKey"
|
||||
<!--<CheckBox x:Uid="PowerLauncher_OverrideWinRKey"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsChecked="False"
|
||||
IsEnabled="False"
|
||||
@@ -94,106 +94,88 @@
|
||||
IsEnabled="False"
|
||||
/>-->
|
||||
|
||||
<controls:SettingsGroup
|
||||
x:Uid="PowerLauncher_SearchResults"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||
<labs:SettingsExpander
|
||||
x:Uid="PowerLauncher_SearchQueryResultsWithDelay"
|
||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
|
||||
Glyph=}"
|
||||
IsExpanded="True">
|
||||
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SearchQueryResultsWithDelay}" />
|
||||
<labs:SettingsExpander.Items>
|
||||
<labs:SettingsCard x:Uid="PowerLauncher_FastSearchInputDelayMs">
|
||||
<NumberBox
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
LargeChange="50"
|
||||
Maximum="500"
|
||||
Minimum="0"
|
||||
SmallChange="10"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelayFast}" />
|
||||
</labs:SettingsCard>
|
||||
<labs:SettingsCard
|
||||
x:Uid="PowerLauncher_SlowSearchInputDelayMs"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}">
|
||||
<NumberBox
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
LargeChange="50"
|
||||
Maximum="1000"
|
||||
Minimum="0"
|
||||
SmallChange="10"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelay}" />
|
||||
</labs:SettingsCard>
|
||||
</labs:SettingsExpander.Items>
|
||||
</labs:SettingsExpander>
|
||||
|
||||
<labs:SettingsExpander
|
||||
x:Uid="PowerLauncher_MaximumNumberOfResults"
|
||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
|
||||
Glyph=}"
|
||||
IsExpanded="True">
|
||||
<NumberBox
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
Minimum="1"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Value="{Binding Mode=TwoWay, Path=MaximumNumberOfResults}" />
|
||||
<labs:SettingsExpander.Items>
|
||||
<labs:SettingsCard ContentAlignment="Left">
|
||||
<CheckBox
|
||||
x:Uid="PowerLauncher_ClearInputOnLaunch"
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ClearInputOnLaunch}" />
|
||||
</labs:SettingsCard>
|
||||
</labs:SettingsExpander.Items>
|
||||
</labs:SettingsExpander>
|
||||
|
||||
<controls:SettingsGroup x:Uid="PowerLauncher_SearchResults" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||
<controls:SettingExpander IsExpanded="True">
|
||||
<controls:SettingExpander.Header>
|
||||
<controls:Setting x:Uid="PowerLauncher_SearchQueryResultsWithDelay" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}" >
|
||||
<controls:Setting.ActionContent>
|
||||
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SearchQueryResultsWithDelay}"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
</controls:SettingExpander.Header>
|
||||
<controls:SettingExpander.Content>
|
||||
<StackPanel>
|
||||
<controls:Setting x:Uid="PowerLauncher_FastSearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}" Style="{StaticResource ExpanderContentSettingStyle}">
|
||||
<controls:Setting.ActionContent>
|
||||
<NumberBox Minimum="0"
|
||||
Maximum="500"
|
||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelayFast}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
HorizontalAlignment="Left"
|
||||
SmallChange="10"
|
||||
LargeChange="50"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<controls:Setting x:Uid="PowerLauncher_SlowSearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}" Style="{StaticResource ExpanderContentSettingStyle}">
|
||||
<controls:Setting.ActionContent>
|
||||
<NumberBox Minimum="0"
|
||||
Maximum="1000"
|
||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelay}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
HorizontalAlignment="Left"
|
||||
SmallChange="10"
|
||||
LargeChange="50"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
</controls:SettingExpander.Content>
|
||||
</controls:SettingExpander>
|
||||
<controls:SettingExpander IsExpanded="True">
|
||||
<controls:SettingExpander.Header>
|
||||
<controls:Setting x:Uid="PowerLauncher_MaximumNumberOfResults" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}">
|
||||
<controls:Setting.ActionContent>
|
||||
<NumberBox Value="{Binding Mode=TwoWay, Path=MaximumNumberOfResults}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Minimum="1"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
</controls:SettingExpander.Header>
|
||||
<controls:SettingExpander.Content>
|
||||
<CheckBox x:Uid="PowerLauncher_ClearInputOnLaunch" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ClearInputOnLaunch}" Margin="{StaticResource ExpanderSettingMargin}" />
|
||||
</controls:SettingExpander.Content>
|
||||
</controls:SettingExpander>
|
||||
|
||||
<controls:SettingExpander IsExpanded="True">
|
||||
<controls:SettingExpander.Header>
|
||||
<controls:Setting x:Uid="PowerLauncher_SearchQueryTuningEnabled" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}" >
|
||||
<controls:Setting.ActionContent>
|
||||
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SearchQueryTuningEnabled}"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
</controls:SettingExpander.Header>
|
||||
<controls:SettingExpander.Content>
|
||||
<StackPanel>
|
||||
<controls:Setting x:Uid="PowerLauncher_SearchClickedItemWeight" Style="{StaticResource ExpanderContentSettingStyle}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}">
|
||||
<controls:Setting.ActionContent>
|
||||
<NumberBox Minimum="0"
|
||||
Maximum="1000"
|
||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchClickedItemWeight}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
HorizontalAlignment="Left"
|
||||
SmallChange="5"
|
||||
LargeChange="50"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<!--<controls:Setting x:Uid="PowerLauncher_WaitForSlowResults" Style="{StaticResource ExpanderContentSettingStyle}">
|
||||
<controls:Setting.ActionContent>
|
||||
<CheckBox
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SearchWaitForSlowResults}"
|
||||
Margin="{StaticResource ExpanderSettingMargin}" />
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>-->
|
||||
|
||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||
<controls:CheckBoxWithDescriptionControl x:Uid="PowerLauncher_WaitForSlowResults"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}"
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SearchWaitForSlowResults}"
|
||||
Margin="{StaticResource ExpanderSettingMargin}" />
|
||||
|
||||
</StackPanel>
|
||||
</controls:SettingExpander.Content>
|
||||
</controls:SettingExpander>
|
||||
|
||||
<labs:SettingsExpander
|
||||
x:Uid="PowerLauncher_SearchQueryTuningEnabled"
|
||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
|
||||
Glyph=}"
|
||||
IsExpanded="True">
|
||||
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SearchQueryTuningEnabled}" />
|
||||
<labs:SettingsExpander.Items>
|
||||
<labs:SettingsCard
|
||||
x:Uid="PowerLauncher_SearchClickedItemWeight"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}">
|
||||
<NumberBox
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
LargeChange="50"
|
||||
Maximum="1000"
|
||||
Minimum="0"
|
||||
SmallChange="5"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchClickedItemWeight}" />
|
||||
</labs:SettingsCard>
|
||||
<labs:SettingsCard
|
||||
ContentAlignment="Left"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}">
|
||||
<controls:CheckBoxWithDescriptionControl
|
||||
x:Uid="PowerLauncher_WaitForSlowResults"
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SearchWaitForSlowResults}" />
|
||||
</labs:SettingsCard>
|
||||
</labs:SettingsExpander.Items>
|
||||
</labs:SettingsExpander>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<!--<ComboBox x:Uid="PowerLauncher_SearchResultPreference"
|
||||
@@ -216,197 +198,274 @@
|
||||
IsEnabled="False"
|
||||
/>-->
|
||||
|
||||
<controls:SettingsGroup x:Uid="Run_PositionAppearance_GroupSettings" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||
<controls:Setting x:Uid="Run_PositionHeader" Icon="">
|
||||
<controls:Setting.ActionContent>
|
||||
<ComboBox SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.MonitorPositionIndex}" MinWidth="{StaticResource SettingActionControlMinWidth}">
|
||||
<ComboBoxItem x:Uid="Run_Radio_Position_Cursor"/>
|
||||
<ComboBoxItem x:Uid="Run_Radio_Position_Primary_Monitor"/>
|
||||
<ComboBoxItem x:Uid="Run_Radio_Position_Focus"/>
|
||||
</ComboBox>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<controls:Setting x:Uid="ColorModeHeader" Icon="">
|
||||
<controls:Setting.Description>
|
||||
<HyperlinkButton Click="OpenColorsSettings_Click"
|
||||
x:Uid="Windows_Color_Settings"/>
|
||||
</controls:Setting.Description>
|
||||
<controls:Setting.ActionContent>
|
||||
<ComboBox SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}" MinWidth="{StaticResource SettingActionControlMinWidth}">
|
||||
<ComboBoxItem x:Uid="Radio_Theme_Dark"/>
|
||||
<ComboBoxItem x:Uid="Radio_Theme_Light"/>
|
||||
<ComboBoxItem x:Uid="Radio_Theme_Default"/>
|
||||
</ComboBox>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
<controls:SettingsGroup
|
||||
x:Uid="Run_PositionAppearance_GroupSettings"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||
<labs:SettingsCard
|
||||
x:Uid="Run_PositionHeader"
|
||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
|
||||
Glyph=}">
|
||||
<ComboBox
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.MonitorPositionIndex}">
|
||||
<ComboBoxItem x:Uid="Run_Radio_Position_Cursor" />
|
||||
<ComboBoxItem x:Uid="Run_Radio_Position_Primary_Monitor" />
|
||||
<ComboBoxItem x:Uid="Run_Radio_Position_Focus" />
|
||||
</ComboBox>
|
||||
</labs:SettingsCard>
|
||||
|
||||
<labs:SettingsCard
|
||||
x:Uid="ColorModeHeader"
|
||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
|
||||
Glyph=}">
|
||||
<labs:SettingsCard.Description>
|
||||
<HyperlinkButton
|
||||
x:Uid="Windows_Color_Settings"
|
||||
Click="OpenColorsSettings_Click" />
|
||||
</labs:SettingsCard.Description>
|
||||
<ComboBox
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ThemeIndex}">
|
||||
<ComboBoxItem x:Uid="Radio_Theme_Dark" />
|
||||
<ComboBoxItem x:Uid="Radio_Theme_Light" />
|
||||
<ComboBoxItem x:Uid="Radio_Theme_Default" />
|
||||
</ComboBox>
|
||||
</labs:SettingsCard>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<controls:SettingsGroup x:Uid="PowerLauncher_Plugins" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||
<controls:SettingsGroup
|
||||
x:Uid="PowerLauncher_Plugins"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||
|
||||
<InfoBar x:Uid="Run_ConflictingKeywordInfo"
|
||||
Severity="Informational"
|
||||
IsClosable="False"
|
||||
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
|
||||
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||
<InfoBar
|
||||
x:Uid="Run_ConflictingKeywordInfo"
|
||||
IsClosable="False"
|
||||
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
|
||||
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
|
||||
Severity="Informational">
|
||||
<InfoBar.ActionButton>
|
||||
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_PowerToysRun#direct-activation-commands"
|
||||
x:Uid="Run_ConflictingKeywordInfo_Link"/>
|
||||
<HyperlinkButton
|
||||
x:Uid="Run_ConflictingKeywordInfo_Link"
|
||||
NavigateUri="https://aka.ms/PowerToysOverview_PowerToysRun#direct-activation-commands" />
|
||||
</InfoBar.ActionButton>
|
||||
</InfoBar>
|
||||
|
||||
<controls:Setting x:Uid="Run_PluginUseDescription" Icon="">
|
||||
<controls:Setting.ActionContent>
|
||||
<AutoSuggestBox x:Uid="PowerLauncher_SearchList"
|
||||
QueryIcon="Find"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
Text="{x:Bind ViewModel.SearchText, Mode=TwoWay}">
|
||||
<i:Interaction.Behaviors>
|
||||
<ic:EventTriggerBehavior EventName="TextChanged">
|
||||
<ic:InvokeCommandAction Command="{x:Bind ViewModel.SearchPluginsCommand}" />
|
||||
</ic:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
</AutoSuggestBox>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
<InfoBar x:Uid="Run_AllPluginsDisabled"
|
||||
Severity="Error"
|
||||
IsTabStop="{x:Bind ViewModel.ShowAllPluginsDisabledWarning, Mode=OneWay}"
|
||||
IsOpen="{x:Bind ViewModel.ShowAllPluginsDisabledWarning, Mode=OneWay}"
|
||||
IsClosable="False" />
|
||||
<labs:SettingsCard
|
||||
x:Uid="Run_PluginUseDescription"
|
||||
HeaderIcon="{ui:FontIcon FontFamily={StaticResource SymbolThemeFontFamily},
|
||||
Glyph=}">
|
||||
<AutoSuggestBox
|
||||
x:Uid="PowerLauncher_SearchList"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
QueryIcon="Find"
|
||||
Text="{x:Bind ViewModel.SearchText, Mode=TwoWay}">
|
||||
<i:Interaction.Behaviors>
|
||||
<ic:EventTriggerBehavior EventName="TextChanged">
|
||||
<ic:InvokeCommandAction Command="{x:Bind ViewModel.SearchPluginsCommand}" />
|
||||
</ic:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
</AutoSuggestBox>
|
||||
</labs:SettingsCard>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Visibility="{x:Bind ViewModel.ShowPluginsLoadingMessage, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<ProgressRing IsActive="True" Width="20" Height="20" Margin="18,18" />
|
||||
<TextBlock x:Uid="Run_PluginsLoading" Style="{ThemeResource SecondaryTextStyle}" VerticalAlignment="Center" />
|
||||
|
||||
|
||||
<InfoBar
|
||||
x:Uid="Run_AllPluginsDisabled"
|
||||
IsClosable="False"
|
||||
IsOpen="{x:Bind ViewModel.ShowAllPluginsDisabledWarning, Mode=OneWay}"
|
||||
IsTabStop="{x:Bind ViewModel.ShowAllPluginsDisabledWarning, Mode=OneWay}"
|
||||
Severity="Error" />
|
||||
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
Visibility="{x:Bind ViewModel.ShowPluginsLoadingMessage, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<ProgressRing
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="18,18"
|
||||
IsActive="True" />
|
||||
<TextBlock
|
||||
x:Uid="Run_PluginsLoading"
|
||||
VerticalAlignment="Center"
|
||||
Style="{ThemeResource SecondaryTextStyle}" />
|
||||
</StackPanel>
|
||||
|
||||
<ListView ItemsSource="{x:Bind Path=ViewModel.Plugins, Mode=OneWay}"
|
||||
IsItemClickEnabled="False"
|
||||
SelectionMode="None"
|
||||
x:Name="PluginsListView">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate x:DataType="ViewModels:PowerLauncherPluginViewModel" x:DefaultBindMode="OneWay">
|
||||
<ItemsControl
|
||||
x:Name="PluginsListView"
|
||||
ItemsSource="{x:Bind Path=ViewModel.Plugins, Mode=OneWay}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Spacing="2" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate
|
||||
x:DataType="ViewModels:PowerLauncherPluginViewModel"
|
||||
x:DefaultBindMode="OneWay">
|
||||
<Grid>
|
||||
<controls:SettingExpander>
|
||||
<controls:SettingExpander.Header>
|
||||
<controls:Setting Header="{x:Bind Path=Name}" Description="{x:Bind Description}" Style="{StaticResource ExpanderHeaderSettingStyle}">
|
||||
<controls:Setting.Icon>
|
||||
<Image Source="{x:Bind IconPath}"
|
||||
Width="20"
|
||||
Height="20" />
|
||||
</controls:Setting.Icon>
|
||||
<controls:Setting.ActionContent>
|
||||
<StackPanel Orientation="Horizontal" Spacing="16" >
|
||||
|
||||
<!-- todo(Stefan): InfoBadge not available
|
||||
<labs:SettingsExpander
|
||||
Description="{x:Bind Description}"
|
||||
Header="{x:Bind Path=Name}">
|
||||
<labs:SettingsExpander.HeaderIcon>
|
||||
<BitmapIcon UriSource="{x:Bind IconPath}" />
|
||||
</labs:SettingsExpander.HeaderIcon>
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
Spacing="16">
|
||||
<!-- todo(Stefan): InfoBadge not available
|
||||
<InfoBadge AutomationProperties.AccessibilityView="Raw"
|
||||
Visibility="{x:Bind ShowBadgeOnPluginSettingError}"
|
||||
Style="{StaticResource CriticalIconInfoBadgeStyle}" />
|
||||
-->
|
||||
-->
|
||||
|
||||
<!-- Temporary badge replacement for InfoBadge control (htcfreek). (Normally you need one grid per icon group. But if you want to show two badges at the same place in a StackPanel you have to put all FontIcons into the same Grid.)-->
|
||||
<Grid>
|
||||
<!-- Error badge -->
|
||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="{StaticResource InfoBarIconBackgroundGlyph}" Foreground="{ThemeResource InfoBarErrorSeverityIconBackground}" Visibility="{x:Bind ShowBadgeOnPluginSettingError}"/>
|
||||
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="{StaticResource InfoBarErrorIconGlyph}" Foreground="{ThemeResource InfoBarErrorSeverityIconForeground}" Visibility="{x:Bind ShowBadgeOnPluginSettingError}"/>
|
||||
</Grid>
|
||||
|
||||
<ToggleSwitch x:Uid="PowerLauncher_EnablePluginToggle"
|
||||
IsOn="{x:Bind Path=Disabled, Converter={StaticResource BoolNegationConverter}, Mode=TwoWay}"/>
|
||||
<!-- Temporary badge replacement for InfoBadge control (htcfreek). (Normally you need one grid per icon group. But if you want to show two badges at the same place in a StackPanel you have to put all FontIcons into the same Grid.) -->
|
||||
<Grid>
|
||||
<!-- Error badge -->
|
||||
<FontIcon
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
Foreground="{ThemeResource InfoBarErrorSeverityIconBackground}"
|
||||
Glyph="{StaticResource InfoBarIconBackgroundGlyph}"
|
||||
Visibility="{x:Bind ShowBadgeOnPluginSettingError}" />
|
||||
<FontIcon
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
Foreground="{ThemeResource InfoBarErrorSeverityIconForeground}"
|
||||
Glyph="{StaticResource InfoBarErrorIconGlyph}"
|
||||
Visibility="{x:Bind ShowBadgeOnPluginSettingError}" />
|
||||
</Grid>
|
||||
|
||||
<ToggleSwitch
|
||||
x:Uid="PowerLauncher_EnablePluginToggle"
|
||||
IsOn="{x:Bind Path=Disabled, Converter={StaticResource BoolNegationConverter}, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
<labs:SettingsExpander.Items>
|
||||
<labs:SettingsCard
|
||||
x:Uid="PowerLauncher_ActionKeyword"
|
||||
IsEnabled="{x:Bind Enabled, Mode=OneWay}">
|
||||
<TextBox
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
Text="{x:Bind Path=ActionKeyword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</labs:SettingsCard>
|
||||
<labs:SettingsCard
|
||||
Padding="0,-4,0,0"
|
||||
HorizontalContentAlignment="Left"
|
||||
Background="{ThemeResource SystemFillColorCriticalBackgroundBrush}"
|
||||
ContentAlignment="Vertical"
|
||||
Visibility="{x:Bind ShowNotAccessibleWarning, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<InfoBar
|
||||
x:Uid="Run_NotAccessibleWarning"
|
||||
Margin="3,0,0,0"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
IsClosable="False"
|
||||
IsOpen="True"
|
||||
IsTabStop="{x:Bind ShowNotAccessibleWarning}"
|
||||
Severity="Error" />
|
||||
</labs:SettingsCard>
|
||||
<labs:SettingsCard
|
||||
ContentAlignment="Left"
|
||||
IsEnabled="{x:Bind Enabled, Mode=OneWay}">
|
||||
<CheckBox
|
||||
Margin="0,-8,0,0"
|
||||
AutomationProperties.Name="{Binding ElementName=IncludeInGlobalResultTitle, Path=Text}"
|
||||
IsChecked="{x:Bind Path=IsGlobal, Mode=TwoWay}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock
|
||||
x:Name="IncludeInGlobalResultTitle"
|
||||
x:Uid="PowerLauncher_IncludeInGlobalResultTitle" />
|
||||
<controls:IsEnabledTextBlock
|
||||
x:Uid="PowerLauncher_IncludeInGlobalResultDescription"
|
||||
FontSize="{StaticResource SecondaryTextFontSize}"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
||||
</StackPanel>
|
||||
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
</controls:SettingExpander.Header>
|
||||
<controls:SettingExpander.Content>
|
||||
<StackPanel>
|
||||
<controls:Setting x:Uid="PowerLauncher_ActionKeyword" Style="{StaticResource ExpanderContentSettingStyle}" IsEnabled="{x:Bind Enabled, Mode=OneWay}">
|
||||
<controls:Setting.ActionContent>
|
||||
<TextBox Text="{x:Bind Path=ActionKeyword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}" />
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
<InfoBar Severity="Error" x:Uid="Run_NotAccessibleWarning"
|
||||
IsTabStop="{x:Bind ShowNotAccessibleWarning}"
|
||||
IsOpen="{x:Bind ShowNotAccessibleWarning}"
|
||||
IsClosable="False" />
|
||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||
|
||||
<StackPanel Orientation="Vertical">
|
||||
<CheckBox AutomationProperties.Name="{Binding ElementName=IncludeInGlobalResultTitle, Path=Text}"
|
||||
IsChecked="{x:Bind Path=IsGlobal, Mode=TwoWay}"
|
||||
IsEnabled="{x:Bind Enabled, Mode=OneWay}"
|
||||
Margin="{StaticResource ExpanderSettingMargin}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock x:Name="IncludeInGlobalResultTitle"
|
||||
x:Uid="PowerLauncher_IncludeInGlobalResultTitle" />
|
||||
<controls:IsEnabledTextBlock x:Uid="PowerLauncher_IncludeInGlobalResultDescription"
|
||||
FontSize="{StaticResource SecondaryTextFontSize}"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
||||
|
||||
</StackPanel>
|
||||
</CheckBox>
|
||||
|
||||
<controls:Setting x:Uid="PowerLauncher_PluginWeightBoost"
|
||||
Style="{StaticResource ExpanderContentSettingStyleTight}"
|
||||
IsEnabled="{x:Bind IsGlobalAndEnabled, Mode=OneWay}">
|
||||
<controls:Setting.ActionContent>
|
||||
<NumberBox Minimum="-1000"
|
||||
Maximum="1000"
|
||||
Value="{x:Bind Mode=TwoWay, Path=WeightBoost}"
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
HorizontalAlignment="Left"
|
||||
SmallChange="10"
|
||||
LargeChange="50"/>
|
||||
</controls:Setting.ActionContent>
|
||||
</controls:Setting>
|
||||
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<ListView ItemsSource="{x:Bind Path=AdditionalOptions}"
|
||||
SelectionMode="None"
|
||||
IsEnabled="{x:Bind Enabled, Mode=OneWay}">
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
</CheckBox>
|
||||
</labs:SettingsCard>
|
||||
<labs:SettingsCard
|
||||
x:Uid="PowerLauncher_PluginWeightBoost"
|
||||
IsEnabled="{x:Bind IsGlobalAndEnabled, Mode=OneWay}">
|
||||
<NumberBox
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
LargeChange="50"
|
||||
Maximum="1000"
|
||||
Minimum="-1000"
|
||||
SmallChange="10"
|
||||
SpinButtonPlacementMode="Compact"
|
||||
Value="{x:Bind Mode=TwoWay, Path=WeightBoost}" />
|
||||
</labs:SettingsCard>
|
||||
<labs:SettingsCard
|
||||
MinHeight="0"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
ContentAlignment="Vertical">
|
||||
<labs:SettingsCard.Resources>
|
||||
<Thickness x:Key="SettingsCardPadding">0</Thickness>
|
||||
<Thickness x:Key="SettingsExpanderItemPadding">0,0,0,0</Thickness>
|
||||
</labs:SettingsCard.Resources>
|
||||
<ItemsControl
|
||||
Margin="0,-6,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
IsEnabled="{x:Bind Enabled, Mode=OneWay}"
|
||||
ItemsSource="{x:Bind Path=AdditionalOptions}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="ViewModels:PluginAdditionalOptionViewModel">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||
<controls:CheckBoxWithDescriptionControl Header="{x:Bind Path=DisplayLabel}" Description="{x:Bind Path=DisplayDescription}"
|
||||
IsChecked="{x:Bind Path=Value, Mode=TwoWay}" Margin="{StaticResource ExpanderSettingMargin}"/>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Stretch"
|
||||
Orientation="Vertical">
|
||||
<labs:SettingsCard
|
||||
MinHeight="0"
|
||||
Margin="1"
|
||||
Padding="0,6,0,12"
|
||||
Background="Transparent"
|
||||
BorderThickness="0,0,0,0"
|
||||
ContentAlignment="Left"
|
||||
CornerRadius="0">
|
||||
<controls:CheckBoxWithDescriptionControl
|
||||
Margin="56,0,0,0"
|
||||
Description="{x:Bind Path=DisplayDescription}"
|
||||
Header="{x:Bind Path=DisplayLabel}"
|
||||
IsChecked="{x:Bind Path=Value, Mode=TwoWay}" />
|
||||
</labs:SettingsCard>
|
||||
<Rectangle
|
||||
Height="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Fill="{ThemeResource CardStrokeColorDefaultBrush}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
|
||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||
<TextBlock Opacity="{x:Bind DisabledOpacity}"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{ThemeResource SecondaryTextStyle}"
|
||||
Margin="{StaticResource ExpanderSettingMargin}">
|
||||
<Run x:Uid="PowerLauncher_AuthoredBy" />
|
||||
<Run FontWeight="SemiBold" Text="{x:Bind Author}" />
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</labs:SettingsCard>
|
||||
<labs:SettingsCard
|
||||
MinHeight="0"
|
||||
BorderThickness="0"
|
||||
ContentAlignment="Right">
|
||||
<TextBlock
|
||||
Opacity="{x:Bind DisabledOpacity}"
|
||||
Style="{ThemeResource SecondaryTextStyle}">
|
||||
<Run x:Uid="PowerLauncher_AuthoredBy" />
|
||||
<Run FontWeight="SemiBold" Text="{x:Bind Author}" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</controls:SettingExpander.Content>
|
||||
</controls:SettingExpander>
|
||||
</labs:SettingsCard>
|
||||
</labs:SettingsExpander.Items>
|
||||
</labs:SettingsExpander>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</controls:SettingsGroup>
|
||||
</StackPanel>
|
||||
|
||||
</controls:SettingsPageControl.ModuleContent>
|
||||
<controls:SettingsPageControl.PrimaryLinks>
|
||||
<controls:PageLink x:Uid="LearnMore_Run" Link="https://aka.ms/PowerToysOverview_PowerToysRun"/>
|
||||
<controls:PageLink
|
||||
x:Uid="LearnMore_Run"
|
||||
Link="https://aka.ms/PowerToysOverview_PowerToysRun" />
|
||||
</controls:SettingsPageControl.PrimaryLinks>
|
||||
<controls:SettingsPageControl.SecondaryLinks>
|
||||
<controls:PageLink Text="Wox" Link="https://github.com/Wox-launcher/Wox/"/>
|
||||
<controls:PageLink Text="Beta Tadele's Window Walker" Link="https://github.com/betsegaw/windowwalker/"/>
|
||||
<controls:PageLink
|
||||
Link="https://github.com/Wox-launcher/Wox/"
|
||||
Text="Wox" />
|
||||
<controls:PageLink
|
||||
Link="https://github.com/betsegaw/windowwalker/"
|
||||
Text="Beta Tadele's Window Walker" />
|
||||
</controls:SettingsPageControl.SecondaryLinks>
|
||||
</controls:SettingsPageControl>
|
||||
</Page>
|
||||
Reference in New Issue
Block a user