Skip to content

Commit

Permalink
Merge pull request #6 from craftersmine/dev
Browse files Browse the repository at this point in the history
Minor updates
  • Loading branch information
craftersmine authored Feb 13, 2024
2 parents 7b0143c + 41e621f commit 5073d3b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
6 changes: 6 additions & 0 deletions craftersmine.Ui.League.TestApp/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Header="PasswordBox" Margin="10" Width="240">
<StackPanel>
<PasswordBox Password="11111111" Style="{StaticResource LeaguePasswordBox}" Margin="1"/>
<PasswordBox Password="11111111" IsEnabled="False" Style="{StaticResource LeaguePasswordBox}" Margin="1"/>
</StackPanel>
</GroupBox>
</WrapPanel>
</ScrollViewer>
</controls:LeagueWindow>
32 changes: 32 additions & 0 deletions craftersmine.Ui.League/LeagueUi.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,7 @@
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
Expand Down Expand Up @@ -1745,4 +1746,35 @@
</Setter.Value>
</Setter>
</Style>

<Style x:Key="LeaguePasswordBox" TargetType="PasswordBox">
<Setter Property="BorderBrush" Value="{StaticResource LeagueTextBoxBorderDefault}"/>
<Setter Property="Padding" Value="4"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="{StaticResource LeagueTextBoxBackgroundDefault}"/>
<Setter Property="CaretBrush" Value="{StaticResource LeagueTextColorDefault}"/>
<Setter Property="Foreground" Value="{StaticResource LeagueTextColorMouseOver}"/>
<Setter Property="Cursor" Value="IBeam"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="PasswordBox">
<Border x:Name="TextBoxBorder" BorderBrush="{StaticResource LeagueTextBoxBorderDefault}" BorderThickness="1" SnapsToDevicePixels="True">
<Border x:Name="TextBoxBorderInner" SnapsToDevicePixels="True" Padding="4 8" BorderBrush="{StaticResource LeagueTextBoxBorderInnerDefault}">
<ScrollViewer x:Name="PART_ContentHost" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</Border>
</Border>

<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter TargetName="TextBoxBorder" Property="BorderBrush" Value="{StaticResource LeagueTextBoxBorderMouseOver}"/>
<Setter TargetName="TextBoxBorderInner" Property="Background" Value="{StaticResource LeagueTextBoxBackgroundMouseOver}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource LeagueTextColorDisabled}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
2 changes: 1 addition & 1 deletion craftersmine.Ui.League/craftersmine.Ui.League.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<RootNamespace>craftersmine.Ui.League</RootNamespace>
<Version>1.3.0</Version>
<Version>1.3.1</Version>
<Authors>craftersmine</Authors>
<Description>WPF library with styles from League of Legends Client</Description>
<Copyright>Copyright © craftersmine 2023</Copyright>
Expand Down

0 comments on commit 5073d3b

Please sign in to comment.