Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 51 additions & 32 deletions src/GamerGuardian/UI/SettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,33 @@
ExtendsContentIntoTitleBar="True"
WindowCornerPreference="Round">
<ui:FluentWindow.Resources>
<!-- Read-only, chrome-free TextBox used to render "Learn more" text so it
can be selected and copied (a TextBlock can't be) — lets users copy the
PowerShell verify / apply / reverse commands straight out of the panel.
The custom template drops all TextBox chrome and disables its scrollbars
so it looks like plain text and doesn't swallow mouse-wheel scrolling. -->
<Style x:Key="CopyableLearnMoreText" TargetType="{x:Type TextBox}">
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="IsReadOnlyCaretVisible" Value="False"/>
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}"/>
<Setter Property="Cursor" Value="IBeam"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<ScrollViewer x:Name="PART_ContentHost" Focusable="False"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Disabled"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<!-- Shared row template for the Debloat tab's two sections (same shape
as the inline toggle templates on the other tabs). -->
<DataTemplate x:Key="ToggleRowTemplate">
Expand Down Expand Up @@ -61,10 +88,9 @@
</Grid>
<Expander Header="Learn more" Margin="0,8,0,0"
Visibility="{Binding LearnMoreVisibility}">
<TextBlock Text="{Binding LearnMoreContent}"
TextWrapping="Wrap" FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Margin="8,8,8,8"/>
<TextBox Text="{Binding LearnMoreContent, Mode=OneWay}"
Style="{StaticResource CopyableLearnMoreText}"
Margin="8,8,8,8"/>
</Expander>
</StackPanel>
</ui:Card>
Expand Down Expand Up @@ -282,10 +308,9 @@
</Grid>
<Expander Header="Learn more" Margin="0,8,0,0"
Visibility="{Binding LearnMoreVisibility}">
<TextBlock Text="{Binding LearnMoreContent}"
TextWrapping="Wrap" FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Margin="8,8,8,8"/>
<TextBox Text="{Binding LearnMoreContent, Mode=OneWay}"
Style="{StaticResource CopyableLearnMoreText}"
Margin="8,8,8,8"/>
</Expander>
</StackPanel>
</ui:Card>
Expand Down Expand Up @@ -356,10 +381,9 @@
</Grid>
<Expander Header="Learn more" Margin="0,8,0,0"
Visibility="{Binding LearnMoreVisibility}">
<TextBlock Text="{Binding LearnMoreContent}"
TextWrapping="Wrap" FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Margin="8,8,8,8"/>
<TextBox Text="{Binding LearnMoreContent, Mode=OneWay}"
Style="{StaticResource CopyableLearnMoreText}"
Margin="8,8,8,8"/>
</Expander>
</StackPanel>
</ui:Card>
Expand Down Expand Up @@ -456,10 +480,9 @@
</Grid>
<Expander Header="Learn more" Margin="0,8,0,0"
Visibility="{Binding LearnMoreVisibility}">
<TextBlock Text="{Binding LearnMoreContent}"
TextWrapping="Wrap" FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Margin="8,8,8,8"/>
<TextBox Text="{Binding LearnMoreContent, Mode=OneWay}"
Style="{StaticResource CopyableLearnMoreText}"
Margin="8,8,8,8"/>
</Expander>
</StackPanel>
</ui:Card>
Expand Down Expand Up @@ -566,10 +589,9 @@
</Grid>
<Expander Header="Learn more" Margin="0,8,0,0"
Visibility="{Binding LearnMoreVisibility}">
<TextBlock Text="{Binding LearnMoreContent}"
TextWrapping="Wrap" FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Margin="8,8,8,8"/>
<TextBox Text="{Binding LearnMoreContent, Mode=OneWay}"
Style="{StaticResource CopyableLearnMoreText}"
Margin="8,8,8,8"/>
</Expander>
</StackPanel>
</ui:Card>
Expand Down Expand Up @@ -646,10 +668,9 @@
</Grid>
<Expander Header="Learn more" Margin="0,8,0,0"
Visibility="{Binding LearnMoreVisibility}">
<TextBlock Text="{Binding LearnMoreContent}"
TextWrapping="Wrap" FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Margin="8,8,8,8"/>
<TextBox Text="{Binding LearnMoreContent, Mode=OneWay}"
Style="{StaticResource CopyableLearnMoreText}"
Margin="8,8,8,8"/>
</Expander>
</StackPanel>
</ui:Card>
Expand Down Expand Up @@ -698,10 +719,9 @@
</Grid>
<Expander Header="Learn more" Margin="0,8,0,0"
Visibility="{Binding LearnMoreVisibility}">
<TextBlock Text="{Binding LearnMoreContent}"
TextWrapping="Wrap" FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Margin="8,8,8,8"/>
<TextBox Text="{Binding LearnMoreContent, Mode=OneWay}"
Style="{StaticResource CopyableLearnMoreText}"
Margin="8,8,8,8"/>
</Expander>
</StackPanel>
</ui:Card>
Expand Down Expand Up @@ -836,10 +856,9 @@
</Grid>
<Expander Header="Learn more" Margin="0,8,0,0"
Visibility="{Binding LearnMoreVisibility}">
<TextBlock Text="{Binding LearnMoreContent}"
TextWrapping="Wrap" FontSize="12"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Margin="8,8,8,8"/>
<TextBox Text="{Binding LearnMoreContent, Mode=OneWay}"
Style="{StaticResource CopyableLearnMoreText}"
Margin="8,8,8,8"/>
</Expander>
</StackPanel>
</ui:Card>
Expand Down