mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +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,17 +36,13 @@ 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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<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}"
|
||||||
@@ -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>
|
||||||
@@ -335,10 +334,9 @@
|
|||||||
<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}"
|
||||||
@@ -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