[FancyZones][Settings] "Allow zones to span across monitors" prerequisites description. (#12913)
This commit is contained in:
parent
19fb3fd56c
commit
f7333c89bb
|
@ -0,0 +1,15 @@
|
||||||
|
<UserControl
|
||||||
|
x:Class="Microsoft.PowerToys.Settings.UI.Controls.TextBlockControl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="300"
|
||||||
|
d:DesignWidth="400">
|
||||||
|
|
||||||
|
<TextBlock x:Name="textBlock"
|
||||||
|
Text="{Binding Text}"
|
||||||
|
TextWrapping="WrapWholeWords"
|
||||||
|
Loaded="TextBlock_Loaded"/>
|
||||||
|
</UserControl>
|
|
@ -0,0 +1,76 @@
|
||||||
|
// 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.ComponentModel;
|
||||||
|
using Windows.UI.Xaml;
|
||||||
|
using Windows.UI.Xaml.Controls;
|
||||||
|
using Windows.UI.Xaml.Media;
|
||||||
|
|
||||||
|
namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||||
|
{
|
||||||
|
public sealed partial class TextBlockControl : UserControl
|
||||||
|
{
|
||||||
|
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
|
||||||
|
"Text",
|
||||||
|
typeof(string),
|
||||||
|
typeof(TextBlockControl),
|
||||||
|
null);
|
||||||
|
|
||||||
|
[Localizable(true)]
|
||||||
|
public string Text
|
||||||
|
{
|
||||||
|
get => (string)GetValue(TextProperty);
|
||||||
|
set => SetValue(TextProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty EnabledForegroundProperty = DependencyProperty.Register(
|
||||||
|
"EnabledForeground",
|
||||||
|
typeof(Brush),
|
||||||
|
typeof(TextBlockControl),
|
||||||
|
null);
|
||||||
|
|
||||||
|
public Brush EnabledForeground
|
||||||
|
{
|
||||||
|
get => (Brush)GetValue(EnabledForegroundProperty);
|
||||||
|
set => SetValue(EnabledForegroundProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty DisabledForegroundProperty = DependencyProperty.Register(
|
||||||
|
"DisabledForeground",
|
||||||
|
typeof(Brush),
|
||||||
|
typeof(TextBlockControl),
|
||||||
|
null);
|
||||||
|
|
||||||
|
public Brush DisabledForeground
|
||||||
|
{
|
||||||
|
get => (Brush)GetValue(DisabledForegroundProperty);
|
||||||
|
set => SetValue(DisabledForegroundProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextBlockControl()
|
||||||
|
{
|
||||||
|
this.InitializeComponent();
|
||||||
|
DataContext = this;
|
||||||
|
|
||||||
|
IsEnabledChanged += TextBlockControl_IsEnabledChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TextBlockControl_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if ((bool)e.NewValue)
|
||||||
|
{
|
||||||
|
textBlock.Foreground = EnabledForeground;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
textBlock.Foreground = DisabledForeground;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TextBlock_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
textBlock.Foreground = IsEnabled ? EnabledForeground : DisabledForeground;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -115,6 +115,9 @@
|
||||||
<DependentUpon>OOBEPageControl.xaml</DependentUpon>
|
<DependentUpon>OOBEPageControl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Controls\SettingsPageControl\PageLink.cs" />
|
<Compile Include="Controls\SettingsPageControl\PageLink.cs" />
|
||||||
|
<Compile Include="Controls\TextBlockControl.xaml.cs">
|
||||||
|
<DependentUpon>TextBlockControl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Converters\AwakeModeToBoolConverter.cs" />
|
<Compile Include="Converters\AwakeModeToBoolConverter.cs" />
|
||||||
<Compile Include="Converters\ImageResizerFitToStringConverter.cs" />
|
<Compile Include="Converters\ImageResizerFitToStringConverter.cs" />
|
||||||
<Compile Include="Converters\ImageResizerUnitToStringConverter.cs" />
|
<Compile Include="Converters\ImageResizerUnitToStringConverter.cs" />
|
||||||
|
@ -334,6 +337,10 @@
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Controls\TextBlockControl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="OOBE\Views\OobeAwake.xaml">
|
<Page Include="OOBE\Views\OobeAwake.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
|
|
@ -880,8 +880,8 @@
|
||||||
Made with 💗 by Microsoft and the PowerToys community.</value>
|
Made with 💗 by Microsoft and the PowerToys community.</value>
|
||||||
<comment>Windows refers to the OS</comment>
|
<comment>Windows refers to the OS</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="FancyZones_SpanZonesAcrossMonitorsCheckBoxControl.Content" xml:space="preserve">
|
<data name="FancyZones_SpanZonesAcrossMonitorsCheckBoxControl.Text" xml:space="preserve">
|
||||||
<value>Allow zones to span across monitors (all monitors must have the same DPI scaling)</value>
|
<value>Allow zones to span across monitors</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ImageResizer_Formatting_ActualHeight.Text" xml:space="preserve">
|
<data name="ImageResizer_Formatting_ActualHeight.Text" xml:space="preserve">
|
||||||
<value>Actual height</value>
|
<value>Actual height</value>
|
||||||
|
@ -1574,4 +1574,7 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and
|
||||||
<data name="RemoveTooltip.Text" xml:space="preserve">
|
<data name="RemoveTooltip.Text" xml:space="preserve">
|
||||||
<value>Remove</value>
|
<value>Remove</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="FancyZones_SpanZonesAcrossMonitorsPrerequisites.Text" xml:space="preserve">
|
||||||
|
<value>All monitors must have the same DPI scaling and will be treated as one large combined rectangle which contains all monitors.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -1,4 +1,4 @@
|
||||||
<Page
|
<Page
|
||||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.FancyZonesPage"
|
x:Class="Microsoft.PowerToys.Settings.UI.Views.FancyZonesPage"
|
||||||
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"
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
</controls:SettingsGroup>
|
</controls:SettingsGroup>
|
||||||
|
|
||||||
|
|
||||||
<controls:SettingsGroup x:Uid="FancyZones_Zones" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
<controls:SettingsGroup x:Uid="FancyZones_Zones" x:Name="ZonesSettingsGroup" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabled}">
|
||||||
<controls:SettingExpander IsExpanded="True">
|
<controls:SettingExpander IsExpanded="True">
|
||||||
<controls:SettingExpander.Header>
|
<controls:SettingExpander.Header>
|
||||||
<controls:Setting x:Uid="FancyZones_ZoneBehavior_GroupSettings" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}" />
|
<controls:Setting x:Uid="FancyZones_ZoneBehavior_GroupSettings" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}" />
|
||||||
|
@ -87,8 +87,19 @@
|
||||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||||
<CheckBox x:Uid="FancyZones_ShowZonesOnAllMonitorsCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShowOnAllMonitors}" Margin="{StaticResource ExpanderSettingMargin}" />
|
<CheckBox x:Uid="FancyZones_ShowZonesOnAllMonitorsCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.ShowOnAllMonitors}" Margin="{StaticResource ExpanderSettingMargin}" />
|
||||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||||
<CheckBox x:Uid="FancyZones_SpanZonesAcrossMonitorsCheckBoxControl" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SpanZonesAcrossMonitors}" Margin="{StaticResource ExpanderSettingMargin}" />
|
<CheckBox IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SpanZonesAcrossMonitors}"
|
||||||
|
Margin="{StaticResource ExpanderSettingMargin}"
|
||||||
|
AutomationProperties.Name="{Binding ElementName=SpanZonesAcrossMonitorsPrerequisitesTitle, Path=Text}">
|
||||||
|
<StackPanel Orientation="Vertical">
|
||||||
|
<TextBlock x:Name="SpanZonesAcrossMonitorsPrerequisitesTitle" x:Uid="FancyZones_SpanZonesAcrossMonitorsCheckBoxControl" />
|
||||||
|
<controls:TextBlockControl x:Uid="FancyZones_SpanZonesAcrossMonitorsPrerequisites"
|
||||||
|
FontSize="{StaticResource SecondaryTextFontSize}"
|
||||||
|
EnabledForeground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
|
DisabledForeground="{ThemeResource TextFillColorDisabledBrush}"
|
||||||
|
IsEnabled="{Binding ElementName=ZonesSettingsGroup, Path=IsEnabled, Mode=OneWay}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</CheckBox>
|
||||||
|
|
||||||
<controls:Setting x:Uid="FancyZones_OverlappingZones" Style="{StaticResource ExpanderContentSettingStyle}">
|
<controls:Setting x:Uid="FancyZones_OverlappingZones" Style="{StaticResource ExpanderContentSettingStyle}">
|
||||||
<controls:Setting.ActionContent>
|
<controls:Setting.ActionContent>
|
||||||
<ComboBox SelectedIndex="{x:Bind Path=ViewModel.OverlappingZonesAlgorithmIndex, Mode=TwoWay}" MinWidth="{StaticResource SettingActionControlMinWidth}">
|
<ComboBox SelectedIndex="{x:Bind Path=ViewModel.OverlappingZonesAlgorithmIndex, Mode=TwoWay}" MinWidth="{StaticResource SettingActionControlMinWidth}">
|
||||||
|
|
Loading…
Reference in a new issue