Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
fix(ui): implement resizable element symbol
Browse files Browse the repository at this point in the history
Add Viewbox to AnnotatedBlockControl to implement automatic transformation.
  • Loading branch information
CSharperMantle committed Jul 4, 2021
1 parent 7bd754d commit 0725db8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Periotris.Net/Periotris.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/CSharperMantle/Periotris.Net</PackageProjectUrl>
<RepositoryUrl>https://github.com/CSharperMantle/Periotris.Net.git</RepositoryUrl>
<AssemblyVersion>1.9.2.0</AssemblyVersion>
<FileVersion>1.9.2.0</FileVersion>
<AssemblyVersion>1.9.3.0</AssemblyVersion>
<FileVersion>1.9.3.0</FileVersion>
<Description>Periotris.Net is a .NET 5 porting and modernized version of CSharperMantle's Periotris game belonging to CmTetris product family.</Description>
<Copyright>Copyright (c) 2020-present Rong "Mantle" Bao (aka CSharperMantle)</Copyright>
<NeutralLanguage></NeutralLanguage>
<PackageTags>game;tetris;tetrimino;wpf;chemistry;periodic-table;tetromino-tiling;tetromino-solver;puzzle</PackageTags>
<SignAssembly>false</SignAssembly>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<Version>1.9.2</Version>
<Version>1.9.3</Version>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<Nullable>warnings</Nullable>
<AnalysisLevel>5.0</AnalysisLevel>
Expand Down
14 changes: 8 additions & 6 deletions Periotris.Net/View/AnnotatedBlockControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Periotris.Net.View"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:DesignHeight="10" d:DesignWidth="10"
Height="10"
Width="10"
Background="White"
BorderBrush="Black" BorderThickness="1">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<TextBlock x:Name="ElementNameTextBlock" Text="El" FontSize="18" VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Grid>
BorderBrush="Black" BorderThickness="0.5">
<Viewbox Stretch="Uniform">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<TextBlock x:Name="ElementNameTextBlock" Text="El" VerticalAlignment="Center" Margin="5 5 5 5"
HorizontalAlignment="Center" />
</Grid>
</Viewbox>
</UserControl>
2 changes: 1 addition & 1 deletion Periotris.Net/View/GamePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<TextBlock x:Name="PausedTextBlock" Grid.Row="1"
Text="{x:Static p:GamePageResources.PausedTextBlockText}"
VerticalAlignment="Center" HorizontalAlignment="Stretch" TextAlignment="Center"
FontFamily="Microsoft YaHei UI, Arial" FontSize="60" FontWeight="Bold" FontStyle="Normal"
FontFamily="Microsoft YaHei UI, Arial" FontSize="60" FontWeight="Regular" FontStyle="Normal"
Foreground="Yellow" Background="DarkGray" Opacity="0.9"
Visibility="{Binding Paused, Converter={StaticResource VisibilityConverter}}" />
</Grid>
Expand Down

0 comments on commit 0725db8

Please sign in to comment.