Skip to content

Commit f6a73bd

Browse files
committed
Improved visibility of keypegs on the gamepage and adapted the horizontal alignment of the guesspegs in the history.
1 parent ea04a88 commit f6a73bd

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

src/clients/xaml/CodeBreaker.WinUI/Views/Pages/GamePage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ public void Receive(GameMoveMessage message)
2525
static void Animate(ConnectedAnimationService animationService, string key, UIElement target)
2626
{
2727
var animation = animationService.GetAnimation(key);
28-
animation.Configuration = new BasicConnectedAnimationConfiguration();
2928

3029
if (animation is null)
3130
return;
3231

32+
animation.Configuration = new BasicConnectedAnimationConfiguration();
3333
animation.TryStart(target);
3434
}
3535

src/clients/xaml/CodeBreaker.WinUI/Views/Templates/CodeBreakerTemplates.xaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,34 @@
88
<conv:IntToEnumerableConverter x:Key="IntToEnumerableConverter" />
99

1010
<DataTemplate x:Key="PegsTemplate" x:Name="PegsTemplate">
11-
<Grid>
11+
<Grid
12+
Margin="-13,0"
13+
Background="{ThemeResource CardBackgroundFillColorDefault}"
14+
CornerRadius="{ThemeResource ControlCornerRadius}">
1215
<Grid.ColumnDefinitions>
1316
<ColumnDefinition Width="auto" />
1417
<ColumnDefinition Width="auto" />
1518
<ColumnDefinition Width="auto" />
1619
</Grid.ColumnDefinitions>
17-
<TextBlock Grid.Column="0" Text="{Binding Path=MoveNumber}" FontSize="{ThemeResource LargeFontSize}" Margin="20,0" VerticalAlignment="Center" />
18-
<Border Grid.Column="1" BorderThickness="2,2,0,2" BorderBrush="{ThemeResource ApplicationPageBackgroundThemeBrush}" Padding="7" CornerRadius="5,0,0,5">
20+
<TextBlock Grid.Column="0" Text="{Binding Path=MoveNumber}" FontSize="{ThemeResource LargeFontSize}" Margin="48,0" VerticalAlignment="Center" />
21+
<Border Grid.Column="1" Margin="20,0,0,0" Padding="7" x:Name="ShadowTarget">
1922
<ItemsControl ItemsSource="{Binding Path=GuessPegs}">
2023
<ItemsControl.ItemsPanel>
2124
<ItemsPanelTemplate>
22-
<StackPanel Orientation="Horizontal" Margin="16,0,0,0" />
25+
<StackPanel Orientation="Horizontal" Spacing="27" />
2326
</ItemsPanelTemplate>
2427
</ItemsControl.ItemsPanel>
2528
<ItemsControl.ItemTemplate>
2629
<DataTemplate>
27-
<Ellipse Width="68" Height="68" Margin="12,4" Fill="{Binding Converter={StaticResource ColorConverter}}" />
30+
<Grid>
31+
<Ellipse Width="68" Height="68" Margin="12,4" Fill="{Binding Converter={StaticResource ColorConverter}}" Stroke="{ThemeResource TextBoxBorderThemeBrush}" StrokeThickness="1" />
32+
</Grid>
2833
</DataTemplate>
2934
</ItemsControl.ItemTemplate>
3035
</ItemsControl>
3136
</Border>
3237

33-
<Border Grid.Column="2" BorderThickness="0,2,2,2" BorderBrush="{ThemeResource ApplicationPageBackgroundThemeBrush}" Padding="30,7" CornerRadius="0,5,5,0">
38+
<Border Grid.Column="2" Padding="30,7" Margin="12,0,0,0" MinWidth="130">
3439
<Grid>
3540
<Grid.RowDefinitions>
3641
<RowDefinition />
@@ -44,7 +49,7 @@
4449
</ItemsControl.ItemsPanel>
4550
<ItemsControl.ItemTemplate>
4651
<DataTemplate>
47-
<Ellipse Width="16" Height="16" Fill="White" />
52+
<Ellipse Width="25" Height="25" Fill="White" Stroke="{ThemeResource TextBoxBorderThemeBrush}" StrokeThickness="1" />
4853
</DataTemplate>
4954
</ItemsControl.ItemTemplate>
5055
</ItemsControl>
@@ -56,7 +61,7 @@
5661
</ItemsControl.ItemsPanel>
5762
<ItemsControl.ItemTemplate>
5863
<DataTemplate>
59-
<Ellipse Width="16" Height="16" Fill="Black" />
64+
<Ellipse Width="25" Height="25" Fill="Black" Stroke="{ThemeResource TextBoxBorderThemeBrush}" StrokeThickness="1" />
6065
</DataTemplate>
6166
</ItemsControl.ItemTemplate>
6267
</ItemsControl>

0 commit comments

Comments
 (0)