Fix styling for other user input box (#459)

This commit is contained in:
Jeffrey
2026-02-11 22:27:50 +01:00
committed by GitHub
parent b48fa24627
commit 50db66bb5f
2 changed files with 18 additions and 4 deletions

View File

@@ -334,10 +334,10 @@
<!-- User TextBox Border Style with disabled state -->
<Style x:Key="UserTextBoxBorderStyle" TargetType="Border">
<Setter Property="Background" Value="{DynamicResource ComboBgColor}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="4"/>
<Setter Property="Background" Value="{DynamicResource ComboBgColor}"/>
<Setter Property="Padding" Value="8,6"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
@@ -345,6 +345,9 @@
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
<Setter Property="Opacity" Value="0.6"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ComboHoverColor}"/>
</Trigger>
</Style.Triggers>
</Style>
@@ -694,7 +697,7 @@
<Style TargetType="Border" BasedOn="{StaticResource SearchBoxBorderStyle}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=AppSearchBox, Path=IsFocused}" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonHover}"/>
<Setter Property="Background" Value="{DynamicResource InputFocusColor}"/>
</DataTrigger>
</Style.Triggers>
</Style>
@@ -765,7 +768,7 @@
<Style TargetType="Border" BasedOn="{StaticResource SearchBoxBorderStyle}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=TweakSearchBox, Path=IsFocused}" Value="True">
<Setter Property="Background" Value="{DynamicResource SecondaryButtonHover}"/>
<Setter Property="Background" Value="{DynamicResource InputFocusColor}"/>
</DataTrigger>
</Style.Triggers>
</Style>
@@ -857,7 +860,16 @@
</ComboBox>
<StackPanel x:Name="OtherUserPanel" Visibility="Collapsed" Margin="0,0,0,6">
<TextBlock x:Name="UsernameValidationMessage" Text="" FontStyle="Italic" Foreground="{DynamicResource CloseHover}" FontSize="11" Margin="3,0,0,4" TextWrapping="Wrap"/>
<Border Style="{StaticResource UserTextBoxBorderStyle}" IsEnabled="{Binding ElementName=OtherUsernameTextBox, Path=IsEnabled}">
<Border IsEnabled="{Binding ElementName=OtherUsernameTextBox, Path=IsEnabled}">
<Border.Style>
<Style TargetType="Border" BasedOn="{StaticResource UserTextBoxBorderStyle}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=OtherUsernameTextBox, Path=IsFocused}" Value="True">
<Setter Property="Background" Value="{DynamicResource InputFocusColor}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>

View File

@@ -511,6 +511,7 @@ function SetWindowThemeResources {
$window.Resources.Add("SecondaryButtonPressed", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#1e1e1e")))
$window.Resources.Add("SecondaryButtonDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#3b3b3b")))
$window.Resources.Add("SecondaryButtonTextDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#787878")))
$window.Resources.Add("InputFocusColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#1f1f1f")))
$window.Resources.Add("ScrollBarThumbColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#3d3d3d")))
$window.Resources.Add("ScrollBarThumbHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#4b4b4b")))
}
@@ -536,6 +537,7 @@ function SetWindowThemeResources {
$window.Resources.Add("SecondaryButtonPressed", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f0f0f0")))
$window.Resources.Add("SecondaryButtonDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f7f7f7")))
$window.Resources.Add("SecondaryButtonTextDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#b7b7b7")))
$window.Resources.Add("InputFocusColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#fbfbfb")))
$window.Resources.Add("ScrollBarThumbColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#b9b9b9")))
$window.Resources.Add("ScrollBarThumbHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#8b8b8b")))
}