mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Settings: Fixing Checkbox margins (#20195)
* Fixing margins as in issue #17110 * one more margin fixed The top of "Include in global result" * set resource-style to one control
This commit is contained in:
@@ -36,16 +36,12 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
|
|||||||
private void CheckBoxSubTextControl_Loaded(object sender, RoutedEventArgs e)
|
private void CheckBoxSubTextControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
StackPanel panel = new StackPanel() { Orientation = Orientation.Vertical };
|
StackPanel panel = new StackPanel() { Orientation = Orientation.Vertical };
|
||||||
|
panel.Children.Add(new TextBlock() { Text = Header, TextWrapping = TextWrapping.WrapWholeWords });
|
||||||
|
|
||||||
// Add text box only if the description is not empty. Required for additional plugin options.
|
// Add text box only if the description is not empty. Required for additional plugin options.
|
||||||
if (!string.IsNullOrWhiteSpace(Description))
|
if (!string.IsNullOrWhiteSpace(Description))
|
||||||
{
|
{
|
||||||
panel.Children.Add(new TextBlock() { Margin = new Thickness(0, 10, 0, 0), Text = Header, TextWrapping = TextWrapping.WrapWholeWords });
|
panel.Children.Add(new IsEnabledTextBlock() { Style = (Style)App.Current.Resources["SecondaryIsEnabledTextBlockStyle"], Text = Description });
|
||||||
panel.Children.Add(new IsEnabledTextBlock() { Style = (Style)App.Current.Resources["SecondaryIsEnabledTextBlockStyle"], Text = Description });
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
panel.Children.Add(new TextBlock() { Margin = new Thickness(0, 0, 0, 0), Text = Header, TextWrapping = TextWrapping.WrapWholeWords });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_checkBoxSubTextControl.Content = panel;
|
_checkBoxSubTextControl.Content = panel;
|
||||||
|
|||||||
@@ -45,8 +45,8 @@
|
|||||||
<controls:SettingExpander.Content>
|
<controls:SettingExpander.Content>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<controls:CheckBoxWithDescriptionControl x:Uid="PowerLauncher_UseCentralizedKeyboardHook"
|
<controls:CheckBoxWithDescriptionControl x:Uid="PowerLauncher_UseCentralizedKeyboardHook"
|
||||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.UseCentralizedKeyboardHook}"
|
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.UseCentralizedKeyboardHook}"
|
||||||
Margin="56, 0, 40, 16"/>
|
Margin="{StaticResource ExpanderSettingMargin}"/>
|
||||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||||
<CheckBox x:Uid="PowerLauncher_IgnoreHotkeysInFullScreen"
|
<CheckBox x:Uid="PowerLauncher_IgnoreHotkeysInFullScreen"
|
||||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.IgnoreHotkeysInFullScreen}"
|
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.IgnoreHotkeysInFullScreen}"
|
||||||
@@ -106,26 +106,26 @@
|
|||||||
<controls:Setting x:Uid="PowerLauncher_FastSearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}" Style="{StaticResource ExpanderContentSettingStyle}">
|
<controls:Setting x:Uid="PowerLauncher_FastSearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}" Style="{StaticResource ExpanderContentSettingStyle}">
|
||||||
<controls:Setting.ActionContent>
|
<controls:Setting.ActionContent>
|
||||||
<NumberBox Minimum="0"
|
<NumberBox Minimum="0"
|
||||||
Maximum="500"
|
Maximum="500"
|
||||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelayFast}"
|
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelayFast}"
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
SpinButtonPlacementMode="Compact"
|
SpinButtonPlacementMode="Compact"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
SmallChange="10"
|
SmallChange="10"
|
||||||
LargeChange="50"/>
|
LargeChange="50"/>
|
||||||
</controls:Setting.ActionContent>
|
</controls:Setting.ActionContent>
|
||||||
</controls:Setting>
|
</controls:Setting>
|
||||||
|
|
||||||
<controls:Setting x:Uid="PowerLauncher_SlowSearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}" Style="{StaticResource ExpanderContentSettingStyle}">
|
<controls:Setting x:Uid="PowerLauncher_SlowSearchInputDelayMs" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryResultsWithDelay}" Style="{StaticResource ExpanderContentSettingStyle}">
|
||||||
<controls:Setting.ActionContent>
|
<controls:Setting.ActionContent>
|
||||||
<NumberBox Minimum="0"
|
<NumberBox Minimum="0"
|
||||||
Maximum="1000"
|
Maximum="1000"
|
||||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelay}"
|
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchInputDelay}"
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
SpinButtonPlacementMode="Compact"
|
SpinButtonPlacementMode="Compact"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
SmallChange="10"
|
SmallChange="10"
|
||||||
LargeChange="50"/>
|
LargeChange="50"/>
|
||||||
</controls:Setting.ActionContent>
|
</controls:Setting.ActionContent>
|
||||||
</controls:Setting>
|
</controls:Setting>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -138,9 +138,9 @@
|
|||||||
<controls:Setting x:Uid="PowerLauncher_MaximumNumberOfResults" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}">
|
<controls:Setting x:Uid="PowerLauncher_MaximumNumberOfResults" Icon="" Style="{StaticResource ExpanderHeaderSettingStyle}">
|
||||||
<controls:Setting.ActionContent>
|
<controls:Setting.ActionContent>
|
||||||
<NumberBox Value="{Binding Mode=TwoWay, Path=MaximumNumberOfResults}"
|
<NumberBox Value="{Binding Mode=TwoWay, Path=MaximumNumberOfResults}"
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
SpinButtonPlacementMode="Compact"
|
SpinButtonPlacementMode="Compact"
|
||||||
Minimum="1"/>
|
Minimum="1"/>
|
||||||
</controls:Setting.ActionContent>
|
</controls:Setting.ActionContent>
|
||||||
</controls:Setting>
|
</controls:Setting>
|
||||||
</controls:SettingExpander.Header>
|
</controls:SettingExpander.Header>
|
||||||
@@ -162,13 +162,13 @@
|
|||||||
<controls:Setting x:Uid="PowerLauncher_SearchClickedItemWeight" Style="{StaticResource ExpanderContentSettingStyle}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}">
|
<controls:Setting x:Uid="PowerLauncher_SearchClickedItemWeight" Style="{StaticResource ExpanderContentSettingStyle}" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}">
|
||||||
<controls:Setting.ActionContent>
|
<controls:Setting.ActionContent>
|
||||||
<NumberBox Minimum="0"
|
<NumberBox Minimum="0"
|
||||||
Maximum="1000"
|
Maximum="1000"
|
||||||
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchClickedItemWeight}"
|
Value="{x:Bind Mode=TwoWay, Path=ViewModel.SearchClickedItemWeight}"
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
SpinButtonPlacementMode="Compact"
|
SpinButtonPlacementMode="Compact"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
SmallChange="5"
|
SmallChange="5"
|
||||||
LargeChange="50"/>
|
LargeChange="50"/>
|
||||||
</controls:Setting.ActionContent>
|
</controls:Setting.ActionContent>
|
||||||
</controls:Setting>
|
</controls:Setting>
|
||||||
|
|
||||||
@@ -181,11 +181,10 @@
|
|||||||
</controls:Setting>-->
|
</controls:Setting>-->
|
||||||
|
|
||||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||||
<controls:CheckBoxWithDescriptionControl
|
<controls:CheckBoxWithDescriptionControl x:Uid="PowerLauncher_WaitForSlowResults"
|
||||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}"
|
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.SearchQueryTuningEnabled}"
|
||||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SearchWaitForSlowResults}"
|
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.SearchWaitForSlowResults}"
|
||||||
Margin="56, -2, 40, 14"
|
Margin="{StaticResource ExpanderSettingMargin}" />
|
||||||
x:Uid="PowerLauncher_WaitForSlowResults"/>
|
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:SettingExpander.Content>
|
</controls:SettingExpander.Content>
|
||||||
@@ -243,13 +242,13 @@
|
|||||||
<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"
|
<InfoBar x:Uid="Run_ConflictingKeywordInfo"
|
||||||
Severity="Informational"
|
Severity="Informational"
|
||||||
IsClosable="False"
|
IsClosable="False"
|
||||||
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
|
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
|
||||||
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||||
<InfoBar.ActionButton>
|
<InfoBar.ActionButton>
|
||||||
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_PowerToysRun#direct-activation-commands"
|
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_PowerToysRun#direct-activation-commands"
|
||||||
x:Uid="Run_ConflictingKeywordInfo_Link"/>
|
x:Uid="Run_ConflictingKeywordInfo_Link"/>
|
||||||
</InfoBar.ActionButton>
|
</InfoBar.ActionButton>
|
||||||
</InfoBar>
|
</InfoBar>
|
||||||
|
|
||||||
@@ -290,8 +289,8 @@
|
|||||||
<controls:Setting Header="{x:Bind Path=Name}" Description="{x:Bind Description}" Style="{StaticResource ExpanderHeaderSettingStyle}">
|
<controls:Setting Header="{x:Bind Path=Name}" Description="{x:Bind Description}" Style="{StaticResource ExpanderHeaderSettingStyle}">
|
||||||
<controls:Setting.Icon>
|
<controls:Setting.Icon>
|
||||||
<Image Source="{x:Bind IconPath}"
|
<Image Source="{x:Bind IconPath}"
|
||||||
Width="20"
|
Width="20"
|
||||||
Height="20" />
|
Height="20" />
|
||||||
</controls:Setting.Icon>
|
</controls:Setting.Icon>
|
||||||
<controls:Setting.ActionContent>
|
<controls:Setting.ActionContent>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="16" >
|
<StackPanel Orientation="Horizontal" Spacing="16" >
|
||||||
@@ -335,21 +334,20 @@
|
|||||||
<CheckBox AutomationProperties.Name="{Binding ElementName=IncludeInGlobalResultTitle, Path=Text}"
|
<CheckBox AutomationProperties.Name="{Binding ElementName=IncludeInGlobalResultTitle, Path=Text}"
|
||||||
IsChecked="{x:Bind Path=IsGlobal, Mode=TwoWay}"
|
IsChecked="{x:Bind Path=IsGlobal, Mode=TwoWay}"
|
||||||
IsEnabled="{x:Bind Enabled, Mode=OneWay}"
|
IsEnabled="{x:Bind Enabled, Mode=OneWay}"
|
||||||
Margin="56, 0, 40, 16">
|
Margin="{StaticResource ExpanderSettingMargin}">
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<TextBlock x:Name="IncludeInGlobalResultTitle"
|
<TextBlock x:Name="IncludeInGlobalResultTitle"
|
||||||
Margin="0,10,0,0"
|
x:Uid="PowerLauncher_IncludeInGlobalResultTitle" />
|
||||||
x:Uid="PowerLauncher_IncludeInGlobalResultTitle" />
|
|
||||||
<controls:IsEnabledTextBlock x:Uid="PowerLauncher_IncludeInGlobalResultDescription"
|
<controls:IsEnabledTextBlock x:Uid="PowerLauncher_IncludeInGlobalResultDescription"
|
||||||
FontSize="{StaticResource SecondaryTextFontSize}"
|
FontSize="{StaticResource SecondaryTextFontSize}"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
|
||||||
<controls:Setting x:Uid="PowerLauncher_PluginWeightBoost"
|
<controls:Setting x:Uid="PowerLauncher_PluginWeightBoost"
|
||||||
Style="{StaticResource ExpanderContentSettingStyleTight}"
|
Style="{StaticResource ExpanderContentSettingStyleTight}"
|
||||||
IsEnabled="{x:Bind IsGlobalAndEnabled, Mode=OneWay}">
|
IsEnabled="{x:Bind IsGlobalAndEnabled, Mode=OneWay}">
|
||||||
<controls:Setting.ActionContent>
|
<controls:Setting.ActionContent>
|
||||||
<NumberBox Minimum="-1000"
|
<NumberBox Minimum="-1000"
|
||||||
Maximum="1000"
|
Maximum="1000"
|
||||||
@@ -374,10 +372,8 @@
|
|||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||||
<controls:CheckBoxWithDescriptionControl Header="{x:Bind Path=DisplayLabel}" Description="{x:Bind Path=DisplayDescription}"
|
<controls:CheckBoxWithDescriptionControl Header="{x:Bind Path=DisplayLabel}" Description="{x:Bind Path=DisplayDescription}"
|
||||||
IsChecked="{x:Bind Path=Value, Mode=TwoWay}"
|
IsChecked="{x:Bind Path=Value, Mode=TwoWay}" Margin="{StaticResource ExpanderSettingMargin}"/>
|
||||||
Margin="56, 0, 40, 16"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
</ListView>
|
</ListView>
|
||||||
|
|||||||
Reference in New Issue
Block a user