Skip to content

Commit 1f15857

Browse files
committed
Fixed new game toggle button style
1 parent 37c40f8 commit 1f15857

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

CoreChess/App.axaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@
5454
<Setter Property="CornerRadius" Value="5" />
5555
</Style>
5656

57+
<Style Selector="ToggleButton.Left /template/ ContentPresenter">
58+
<Setter Property="CornerRadius" Value="5,0,0,5" />
59+
</Style>
60+
<Style Selector="ToggleButton.Middle /template/ ContentPresenter">
61+
<Setter Property="CornerRadius" Value="0" />
62+
</Style>
63+
<Style Selector="ToggleButton.Right /template/ ContentPresenter">
64+
<Setter Property="CornerRadius" Value="0,5,5,0" />
65+
</Style>
66+
5767
<Style Selector="Button.Accent">
5868
<Setter Property="Background" Value="{DynamicResource SystemAccentColor}"/>
5969
</Style>

CoreChess/Views/NewGameWindow.axaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,16 @@
4343
<ColumnDefinition Width="*" />
4444
</Grid.ColumnDefinitions>
4545

46-
<ToggleButton Name="m_WhiteBtn" IsThreeState="False" IsChecked="True" Click="OnWhiteClick" Grid.Column="0" HorizontalAlignment="Stretch">
46+
<ToggleButton Name="m_WhiteBtn" IsThreeState="False" IsChecked="True" Click="OnWhiteClick" Grid.Column="0" HorizontalAlignment="Stretch"
47+
Classes="Left">
4748
<Image Name="m_White" Height="100"></Image>
4849
</ToggleButton>
4950
<ToggleButton Name="m_RandomBtn" IsThreeState="False" Click="OnRandomClick" Grid.Column="1" HorizontalAlignment="Stretch"
50-
Height="{Binding #m_WhiteBtn.Bounds.Height}">
51+
Height="{Binding #m_WhiteBtn.Bounds.Height}" Classes="Middle">
5152
<TextBlock Text="?" FontSize="36" VerticalAlignment="Center" HorizontalAlignment="Center" />
5253
</ToggleButton>
53-
<ToggleButton Name="m_BlackBtn" IsThreeState="False" Click="OnBlackClick" Grid.Column="2" HorizontalAlignment="Stretch">
54+
<ToggleButton Name="m_BlackBtn" IsThreeState="False" Click="OnBlackClick" Grid.Column="2" HorizontalAlignment="Stretch"
55+
Classes="Right">
5456
<Image Name="m_Black" Height="100"></Image>
5557
</ToggleButton>
5658

0 commit comments

Comments
 (0)