mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-04-03 14:06:27 +00:00
Refactor/clean up window styles
This commit is contained in:
@@ -9,55 +9,6 @@
|
|||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Foreground="{DynamicResource FgColor}">
|
Foreground="{DynamicResource FgColor}">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<!-- CheckBox Style -->
|
|
||||||
<Style TargetType="CheckBox">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
|
||||||
<Setter Property="Padding" Value="4,2"/>
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="CheckBox">
|
|
||||||
<Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="4" Padding="{TemplateBinding Padding}">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Border x:Name="CheckBoxBorder" Grid.Column="0" Width="18" Height="18" Background="{DynamicResource CheckBoxBgColor}" BorderBrush="{DynamicResource CheckBoxBorderColor}" BorderThickness="1" CornerRadius="4" Margin="0,0,8,0">
|
|
||||||
<TextBlock x:Name="CheckMark" Text="" FontFamily="Segoe MDL2 Assets" FontSize="12" Foreground="{DynamicResource ButtonBg}" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"/>
|
|
||||||
</Border>
|
|
||||||
<ContentPresenter Grid.Column="1" VerticalAlignment="Center" Margin="0,0,0,1"/>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
<ControlTemplate.Triggers>
|
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource CheckBoxHoverColor}"/>
|
|
||||||
</Trigger>
|
|
||||||
<Trigger Property="IsChecked" Value="True">
|
|
||||||
<Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonBg}"/>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
|
|
||||||
<Setter TargetName="CheckMark" Property="Foreground" Value="White"/>
|
|
||||||
</Trigger>
|
|
||||||
<MultiTrigger>
|
|
||||||
<MultiTrigger.Conditions>
|
|
||||||
<Condition Property="IsMouseOver" Value="True"/>
|
|
||||||
<Condition Property="IsChecked" Value="True"/>
|
|
||||||
</MultiTrigger.Conditions>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonHover}"/>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonHover}"/>
|
|
||||||
</MultiTrigger>
|
|
||||||
</ControlTemplate.Triggers>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<!-- CheckBox style for apps panels -->
|
|
||||||
<Style x:Key="AppsPanelCheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
|
||||||
<Setter Property="Margin" Value="2,3,2,3"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<!-- Title Bar Button Style -->
|
<!-- Title Bar Button Style -->
|
||||||
<Style x:Key="TitleBarButton" TargetType="Button">
|
<Style x:Key="TitleBarButton" TargetType="Button">
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
|||||||
@@ -336,133 +336,6 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- CheckBox Style -->
|
|
||||||
<Style TargetType="CheckBox">
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
|
||||||
<Setter Property="Padding" Value="4,2"/>
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="CheckBox">
|
|
||||||
<Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="4" Padding="{TemplateBinding Padding}">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Border x:Name="CheckBoxBorder" Grid.Column="0" Width="18" Height="18" Background="{DynamicResource CheckBoxBgColor}" BorderBrush="{DynamicResource CheckBoxBorderColor}" BorderThickness="1" CornerRadius="4" Margin="0,0,8,0">
|
|
||||||
<Grid>
|
|
||||||
<TextBlock x:Name="CheckMark" Text="" FontFamily="Segoe Fluent Icons" FontSize="12" Foreground="{DynamicResource ButtonBg}" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0">
|
|
||||||
<TextBlock.Clip>
|
|
||||||
<RectangleGeometry x:Name="CheckMarkClip" Rect="0,0,0,16"/>
|
|
||||||
</TextBlock.Clip>
|
|
||||||
</TextBlock>
|
|
||||||
<TextBlock x:Name="IndeterminateMark" Text="" FontFamily="Segoe Fluent Icons" FontSize="11" Foreground="{DynamicResource ButtonBg}" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0" Margin="1,1,0,0">
|
|
||||||
<TextBlock.Clip>
|
|
||||||
<RectangleGeometry x:Name="IndeterminateMarkClip" Rect="0,0,0,16"/>
|
|
||||||
</TextBlock.Clip>
|
|
||||||
</TextBlock>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
<ContentPresenter Grid.Column="1" VerticalAlignment="Center" Margin="0,0,0,2"/>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
<ControlTemplate.Triggers>
|
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource CheckBoxHoverColor}"/>
|
|
||||||
</Trigger>
|
|
||||||
<Trigger Property="IsChecked" Value="True">
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonBg}"/>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
|
|
||||||
<Setter TargetName="CheckMark" Property="Foreground" Value="White"/>
|
|
||||||
<Setter TargetName="CheckMark" Property="Opacity" Value="1"/>
|
|
||||||
<Setter TargetName="IndeterminateMark" Property="Opacity" Value="0"/>
|
|
||||||
<Trigger.EnterActions>
|
|
||||||
<BeginStoryboard>
|
|
||||||
<Storyboard>
|
|
||||||
<DoubleAnimation Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
|
|
||||||
<RectAnimation Storyboard.TargetName="CheckMarkClip" Storyboard.TargetProperty="Rect" From="0,0,0,16" To="0,0,16,16" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
|
|
||||||
</Storyboard>
|
|
||||||
</BeginStoryboard>
|
|
||||||
</Trigger.EnterActions>
|
|
||||||
<Trigger.ExitActions>
|
|
||||||
<BeginStoryboard>
|
|
||||||
<Storyboard>
|
|
||||||
<RectAnimation Storyboard.TargetName="CheckMarkClip" Storyboard.TargetProperty="Rect" From="0,0,16,16" To="16,0,0,16" Duration="0:0:0.15" FillBehavior="HoldEnd"/>
|
|
||||||
<DoubleAnimation Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" FillBehavior="HoldEnd"/>
|
|
||||||
</Storyboard>
|
|
||||||
</BeginStoryboard>
|
|
||||||
</Trigger.ExitActions>
|
|
||||||
</Trigger>
|
|
||||||
<Trigger Property="IsChecked" Value="{x:Null}">
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonBg}"/>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Opacity" Value="0.8"/>
|
|
||||||
<Setter TargetName="IndeterminateMark" Property="Foreground" Value="White"/>
|
|
||||||
<Setter TargetName="IndeterminateMark" Property="Opacity" Value="1"/>
|
|
||||||
<Setter TargetName="CheckMark" Property="Opacity" Value="0"/>
|
|
||||||
<Trigger.EnterActions>
|
|
||||||
<BeginStoryboard>
|
|
||||||
<Storyboard>
|
|
||||||
<DoubleAnimation Storyboard.TargetName="IndeterminateMark" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
|
|
||||||
<RectAnimation Storyboard.TargetName="IndeterminateMarkClip" Storyboard.TargetProperty="Rect" From="0,0,0,16" To="0,0,16,16" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
|
|
||||||
</Storyboard>
|
|
||||||
</BeginStoryboard>
|
|
||||||
</Trigger.EnterActions>
|
|
||||||
<Trigger.ExitActions>
|
|
||||||
<BeginStoryboard>
|
|
||||||
<Storyboard>
|
|
||||||
<RectAnimation Storyboard.TargetName="IndeterminateMarkClip" Storyboard.TargetProperty="Rect" From="0,0,16,16" To="16,0,0,16" Duration="0:0:0.15" FillBehavior="HoldEnd"/>
|
|
||||||
<DoubleAnimation Storyboard.TargetName="IndeterminateMark" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" FillBehavior="HoldEnd"/>
|
|
||||||
</Storyboard>
|
|
||||||
</BeginStoryboard>
|
|
||||||
</Trigger.ExitActions>
|
|
||||||
</Trigger>
|
|
||||||
<Trigger Property="IsChecked" Value="False">
|
|
||||||
<Setter TargetName="CheckMark" Property="Opacity" Value="0"/>
|
|
||||||
<Setter TargetName="IndeterminateMark" Property="Opacity" Value="0"/>
|
|
||||||
</Trigger>
|
|
||||||
<Trigger Property="IsEnabled" Value="False">
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonDisabled}"/>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
|
||||||
<Setter Property="Opacity" Value="0.4"/>
|
|
||||||
</Trigger>
|
|
||||||
<MultiTrigger>
|
|
||||||
<MultiTrigger.Conditions>
|
|
||||||
<Condition Property="IsMouseOver" Value="True"/>
|
|
||||||
<Condition Property="IsChecked" Value="True"/>
|
|
||||||
</MultiTrigger.Conditions>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonHover}"/>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonHover}"/>
|
|
||||||
</MultiTrigger>
|
|
||||||
<MultiTrigger>
|
|
||||||
<MultiTrigger.Conditions>
|
|
||||||
<Condition Property="IsMouseOver" Value="True"/>
|
|
||||||
<Condition Property="IsChecked" Value="{x:Null}"/>
|
|
||||||
</MultiTrigger.Conditions>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonHover}"/>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonHover}"/>
|
|
||||||
<Setter TargetName="CheckBoxBorder" Property="Opacity" Value="0.8"/>
|
|
||||||
</MultiTrigger>
|
|
||||||
</ControlTemplate.Triggers>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<!-- CheckBox style for feature toggles -->
|
|
||||||
<Style x:Key="FeatureCheckboxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
|
||||||
<Setter Property="Margin" Value="-4,-2,-4,10"/>
|
|
||||||
<Setter Property="Padding" Value="4,2"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<!-- CheckBox style for apps panels -->
|
|
||||||
<Style x:Key="AppsPanelCheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
|
||||||
<Setter Property="Margin" Value="2,3,2,3"/>
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<!-- TextBlock style for App ID column in apps table -->
|
<!-- TextBlock style for App ID column in apps table -->
|
||||||
<Style x:Key="AppIdTextStyle" TargetType="TextBlock">
|
<Style x:Key="AppIdTextStyle" TargetType="TextBlock">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource AppIdColor}"/>
|
<Setter Property="Foreground" Value="{DynamicResource AppIdColor}"/>
|
||||||
@@ -502,11 +375,6 @@
|
|||||||
<Setter Property="Margin" Value="0,1,0,0"/>
|
<Setter Property="Margin" Value="0,1,0,0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Style for dynamically-created preset checkboxes in the Quick Select popup -->
|
|
||||||
<Style x:Key="PresetCheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
|
||||||
<Setter Property="Margin" Value="8,4"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<!-- Progress step indicator fill colors -->
|
<!-- Progress step indicator fill colors -->
|
||||||
<SolidColorBrush x:Key="ProgressActiveColor" Color="#0067c0"/>
|
<SolidColorBrush x:Key="ProgressActiveColor" Color="#0067c0"/>
|
||||||
<SolidColorBrush x:Key="ProgressInactiveColor" Color="#808080"/>
|
<SolidColorBrush x:Key="ProgressInactiveColor" Color="#808080"/>
|
||||||
@@ -1155,12 +1023,12 @@
|
|||||||
|
|
||||||
<!-- Restore Point Option -->
|
<!-- Restore Point Option -->
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<CheckBox x:Name="RestorePointCheckBox" Style="{StaticResource FeatureCheckboxStyle}" IsChecked="True" Content="Create a system restore point (Recommended)" AutomationProperties.Name="Create a system restore point (Recommended)"/>
|
<CheckBox x:Name="RestorePointCheckBox" Style="{DynamicResource FeatureCheckboxStyle}" IsChecked="True" Content="Create a system restore point (Recommended)" AutomationProperties.Name="Create a system restore point (Recommended)"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Restart Explorer Option -->
|
<!-- Restart Explorer Option -->
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<CheckBox x:Name="RestartExplorerCheckBox" Style="{StaticResource FeatureCheckboxStyle}" Content="Restart the Windows Explorer process to apply all changes immediately" AutomationProperties.Name="Restart the Windows Explorer process to apply all changes immediately"/>
|
<CheckBox x:Name="RestartExplorerCheckBox" Style="{DynamicResource FeatureCheckboxStyle}" Content="Restart the Windows Explorer process to apply all changes immediately" AutomationProperties.Name="Restart the Windows Explorer process to apply all changes immediately"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<Style x:Key="RevertItemUndoTextStyle" TargetType="TextBlock">
|
<Style x:Key="RevertItemUndoTextStyle" TargetType="TextBlock">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
||||||
<Setter Property="Opacity" Value="0.75"/>
|
<Setter Property="Opacity" Value="0.75"/>
|
||||||
<Setter Property="Margin" Value="30,-4,0,3"/>
|
<Setter Property="Margin" Value="26,-8,0,3"/>
|
||||||
<Setter Property="FontSize" Value="12"/>
|
<Setter Property="FontSize" Value="12"/>
|
||||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -151,6 +151,138 @@
|
|||||||
<Setter Property="TextAlignment" Value="Center"/>
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<!-- Base CheckBox style used across windows -->
|
||||||
|
<Style TargetType="CheckBox">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Padding" Value="4,2"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="CheckBox">
|
||||||
|
<Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="4" Padding="{TemplateBinding Padding}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border x:Name="CheckBoxBorder" Grid.Column="0" Width="18" Height="18" Background="{DynamicResource CheckBoxBgColor}" BorderBrush="{DynamicResource CheckBoxBorderColor}" BorderThickness="1" CornerRadius="4" Margin="0,0,8,0">
|
||||||
|
<Grid>
|
||||||
|
<TextBlock x:Name="CheckMark" Text="" FontFamily="Segoe Fluent Icons" FontSize="12" Foreground="{DynamicResource ButtonBg}" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0">
|
||||||
|
<TextBlock.Clip>
|
||||||
|
<RectangleGeometry x:Name="CheckMarkClip" Rect="0,0,0,16"/>
|
||||||
|
</TextBlock.Clip>
|
||||||
|
</TextBlock>
|
||||||
|
<TextBlock x:Name="IndeterminateMark" Text="" FontFamily="Segoe Fluent Icons" FontSize="11" Foreground="{DynamicResource ButtonBg}" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0" Margin="1,1,0,0">
|
||||||
|
<TextBlock.Clip>
|
||||||
|
<RectangleGeometry x:Name="IndeterminateMarkClip" Rect="0,0,0,16"/>
|
||||||
|
</TextBlock.Clip>
|
||||||
|
</TextBlock>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ContentPresenter Grid.Column="1" VerticalAlignment="Center" Margin="0,0,0,2"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource CheckBoxHoverColor}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonBg}"/>
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
|
||||||
|
<Setter TargetName="CheckMark" Property="Foreground" Value="White"/>
|
||||||
|
<Setter TargetName="CheckMark" Property="Opacity" Value="1"/>
|
||||||
|
<Setter TargetName="IndeterminateMark" Property="Opacity" Value="0"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
|
||||||
|
<RectAnimation Storyboard.TargetName="CheckMarkClip" Storyboard.TargetProperty="Rect" From="0,0,0,16" To="0,0,16,16" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<RectAnimation Storyboard.TargetName="CheckMarkClip" Storyboard.TargetProperty="Rect" From="0,0,16,16" To="16,0,0,16" Duration="0:0:0.15" FillBehavior="HoldEnd"/>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" FillBehavior="HoldEnd"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="{x:Null}">
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonBg}"/>
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonBg}"/>
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="Opacity" Value="0.8"/>
|
||||||
|
<Setter TargetName="IndeterminateMark" Property="Foreground" Value="White"/>
|
||||||
|
<Setter TargetName="IndeterminateMark" Property="Opacity" Value="1"/>
|
||||||
|
<Setter TargetName="CheckMark" Property="Opacity" Value="0"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="IndeterminateMark" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
|
||||||
|
<RectAnimation Storyboard.TargetName="IndeterminateMarkClip" Storyboard.TargetProperty="Rect" From="0,0,0,16" To="0,0,16,16" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<RectAnimation Storyboard.TargetName="IndeterminateMarkClip" Storyboard.TargetProperty="Rect" From="0,0,16,16" To="16,0,0,16" Duration="0:0:0.15" FillBehavior="HoldEnd"/>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="IndeterminateMark" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.15" FillBehavior="HoldEnd"/>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</Trigger.ExitActions>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsChecked" Value="False">
|
||||||
|
<Setter TargetName="CheckMark" Property="Opacity" Value="0"/>
|
||||||
|
<Setter TargetName="IndeterminateMark" Property="Opacity" Value="0"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonDisabled}"/>
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
||||||
|
<Setter Property="Opacity" Value="0.4"/>
|
||||||
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="True"/>
|
||||||
|
<Condition Property="IsChecked" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonHover}"/>
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonHover}"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="True"/>
|
||||||
|
<Condition Property="IsChecked" Value="{x:Null}"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="Background" Value="{DynamicResource ButtonHover}"/>
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="BorderBrush" Value="{DynamicResource ButtonHover}"/>
|
||||||
|
<Setter TargetName="CheckBoxBorder" Property="Opacity" Value="0.8"/>
|
||||||
|
</MultiTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Shared checkbox style used for feature toggles across windows -->
|
||||||
|
<Style x:Key="FeatureCheckboxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
||||||
|
<Setter Property="Margin" Value="-4,-2,-4,10"/>
|
||||||
|
<Setter Property="Padding" Value="4,2"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Shared CheckBox style for app list items -->
|
||||||
|
<Style x:Key="AppsPanelCheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
||||||
|
<Setter Property="Margin" Value="2,3,2,3"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Shared CheckBox style for preset picker entries -->
|
||||||
|
<Style x:Key="PresetCheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
||||||
|
<Setter Property="Margin" Value="8,4"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- ScrollBar Style -->
|
<!-- ScrollBar Style -->
|
||||||
<Style TargetType="{x:Type ScrollBar}">
|
<Style TargetType="{x:Type ScrollBar}">
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
|||||||
@@ -1403,13 +1403,13 @@ function Show-MainWindow {
|
|||||||
if ($userSelectionCombo.SelectedIndex -ne 2) {
|
if ($userSelectionCombo.SelectedIndex -ne 2) {
|
||||||
$appRemovalScopeCombo.IsEnabled = $true
|
$appRemovalScopeCombo.IsEnabled = $true
|
||||||
}
|
}
|
||||||
$appRemovalScopeSection.Opacity = 1.0
|
$appRemovalScopeSection.Visibility = 'Visible'
|
||||||
UpdateAppRemovalScopeDescription
|
UpdateAppRemovalScopeDescription
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Disable app removal scope selection when no apps selected
|
# Disable app removal scope selection when no apps selected
|
||||||
$appRemovalScopeCombo.IsEnabled = $false
|
$appRemovalScopeCombo.IsEnabled = $false
|
||||||
$appRemovalScopeSection.Opacity = 0.5
|
$appRemovalScopeSection.Visibility = 'Collapsed'
|
||||||
$appRemovalScopeDescription.Text = "No apps selected for removal."
|
$appRemovalScopeDescription.Text = "No apps selected for removal."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,19 +55,9 @@ function Show-RevertSettingsModal {
|
|||||||
$applyBtn = $revertWindow.FindName('RevertApplyBtn')
|
$applyBtn = $revertWindow.FindName('RevertApplyBtn')
|
||||||
$cancelBtn = $revertWindow.FindName('RevertCancelBtn')
|
$cancelBtn = $revertWindow.FindName('RevertCancelBtn')
|
||||||
$restartExplorerCheckbox = $revertWindow.FindName('RevertRestartExplorerCheckBox')
|
$restartExplorerCheckbox = $revertWindow.FindName('RevertRestartExplorerCheckBox')
|
||||||
|
$featureCheckboxStyle = $revertWindow.FindResource('FeatureCheckboxStyle')
|
||||||
$entryCheckboxes = @()
|
|
||||||
$featureCheckboxStyle = $null
|
|
||||||
if ($ownerWindow) {
|
|
||||||
try {
|
|
||||||
$featureCheckboxStyle = $ownerWindow.FindResource('FeatureCheckboxStyle')
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($restartExplorerCheckbox -and $featureCheckboxStyle) {
|
|
||||||
$restartExplorerCheckbox.Style = $featureCheckboxStyle
|
$restartExplorerCheckbox.Style = $featureCheckboxStyle
|
||||||
}
|
$entryCheckboxes = @()
|
||||||
|
|
||||||
foreach ($setting in $LastUsedSettings.Settings) {
|
foreach ($setting in $LastUsedSettings.Settings) {
|
||||||
if ($setting.Value -ne $true) { continue }
|
if ($setting.Value -ne $true) { continue }
|
||||||
@@ -95,7 +85,7 @@ function Show-RevertSettingsModal {
|
|||||||
'No revert action available'
|
'No revert action available'
|
||||||
}
|
}
|
||||||
|
|
||||||
$canUndo = ($undoFeature -ne $null)
|
$canUndo = ($null -ne $undoFeature)
|
||||||
|
|
||||||
$itemBorder = New-Object System.Windows.Controls.Border
|
$itemBorder = New-Object System.Windows.Controls.Border
|
||||||
$itemBorder.Style = $revertWindow.FindResource('RevertItemBorderStyle')
|
$itemBorder.Style = $revertWindow.FindResource('RevertItemBorderStyle')
|
||||||
@@ -106,13 +96,7 @@ function Show-RevertSettingsModal {
|
|||||||
$checkbox = New-Object System.Windows.Controls.CheckBox
|
$checkbox = New-Object System.Windows.Controls.CheckBox
|
||||||
$checkbox.Content = $label
|
$checkbox.Content = $label
|
||||||
$checkbox.Tag = $setting.Name
|
$checkbox.Tag = $setting.Name
|
||||||
if ($featureCheckboxStyle) {
|
|
||||||
$checkbox.Style = $featureCheckboxStyle
|
$checkbox.Style = $featureCheckboxStyle
|
||||||
}
|
|
||||||
else {
|
|
||||||
$checkbox.Foreground = $revertWindow.FindResource('FgColor')
|
|
||||||
}
|
|
||||||
$checkbox.Margin = [System.Windows.Thickness]::new(0, 0, 0, 3)
|
|
||||||
$checkbox.IsEnabled = $canUndo
|
$checkbox.IsEnabled = $canUndo
|
||||||
|
|
||||||
$undoText = New-Object System.Windows.Controls.TextBlock
|
$undoText = New-Object System.Windows.Controls.TextBlock
|
||||||
|
|||||||
Reference in New Issue
Block a user