Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

Commit 9f83526

Browse files
committed
Milestone Keyboard Layout
1 parent d81b833 commit 9f83526

File tree

1 file changed

+81
-36
lines changed

1 file changed

+81
-36
lines changed

src/InvvardDev.EZLayoutDisplay.Desktop/Skins/KeyboardLayoutSkin.xaml

Lines changed: 81 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<FontFamily x:Key="OryxFontFamily">/Skins/Fonts/#Oryx</FontFamily>
88

99
<SolidColorBrush x:Key="KeyLabelForeground" Color="#323546" />
10+
<SolidColorBrush x:Key="LayerIdForegroundBrush" Color="#F7F8F8" />
1011
<SolidColorBrush x:Key="DefaultBackgroundBrush" Color="#FFFFFF" />
1112
<SolidColorBrush x:Key="ColorControlBackgroundBrush" Color="#FFF1BA" />
1213
<SolidColorBrush x:Key="CustomLabelBackgroundBrush" Color="#FFBFA3" />
@@ -44,25 +45,51 @@
4445
</Setter>
4546
</Style>
4647

47-
<Style TargetType="Label" x:Key="BaseLabelStyle">
48-
<Setter Property="Foreground" Value="{StaticResource KeyLabelForeground}" />
48+
<Style TargetType="Ellipse" x:Key="ColorPickerAccentStyle">
49+
<Setter Property="Width" Value="10" />
50+
<Setter Property="Height" Value="10" />
51+
<Setter Property="VerticalAlignment" Value="Top" />
52+
<Setter Property="HorizontalAlignment" Value="Right" />
53+
<Setter Property="Margin" Value="0 -4 -3 0" />
4954
</Style>
5055

51-
<Style TargetType="Label" x:Key="LabelStyle" BasedOn="{StaticResource BaseLabelStyle}">
52-
<Setter Property="FontFamily" Value="{StaticResource InterFontFamily}" />
53-
<Setter Property="FontSize" Value="20" />
56+
<Style TargetType="Viewbox" x:Key="LabelViewBox">
57+
<Setter Property="Height" Value="40" />
58+
<Setter Property="Stretch" Value="Uniform" />
59+
<Setter Property="StretchDirection" Value="DownOnly" />
60+
<Setter Property="VerticalAlignment" Value="Center" />
5461
</Style>
5562

56-
<Style TargetType="Label" x:Key="GlyphStyle" BasedOn="{StaticResource BaseLabelStyle}">
57-
<Setter Property="FontFamily" Value="{StaticResource OryxFontFamily}" />
58-
<Setter Property="FontSize" Value="22" />
63+
<Style TargetType="Viewbox" x:Key="ModifiedLabelViewBox" BasedOn="{StaticResource LabelViewBox}">
64+
<Setter Property="Height" Value="20" />
65+
<Setter Property="StretchDirection" Value="Both" />
66+
<Setter Property="VerticalAlignment" Value="Top" />
67+
<Setter Property="Margin" Value="0 -3 0 0" />
5968
</Style>
6069

61-
<DataTemplate x:Key="KeyDataTemplate">
62-
<Canvas>
63-
<Rectangle x:Name="KeyRect" Style="{DynamicResource KeyBase}" />
64-
</Canvas>
65-
</DataTemplate>
70+
<Style TargetType="Viewbox" x:Key="ModifierViewBox" BasedOn="{StaticResource ModifiedLabelViewBox}">
71+
<Setter Property="Height" Value="10" />
72+
</Style>
73+
74+
<Style TargetType="Grid" x:Key="ContentGridBase">
75+
<Setter Property="Canvas.Top" Value="{Binding TopKeyY}" />
76+
<Setter Property="Canvas.Left" Value="{Binding TopKeyX}" />
77+
<Setter Property="Width" Value="{Binding TopKeyWidth}" />
78+
<Setter Property="Height" Value="{Binding TopKeyHeight}" />
79+
<Setter Property="RenderTransformOrigin" Value="{Binding RotationOrigin}" />
80+
<Setter Property="RenderTransform">
81+
<Setter.Value>
82+
<TransformGroup>
83+
<RotateTransform Angle="{Binding RotationAngle}" />
84+
</TransformGroup>
85+
</Setter.Value>
86+
</Setter>
87+
</Style>
88+
89+
<Style TargetType="Grid" x:Key="LayerGrid">
90+
<Setter Property="VerticalAlignment" Value="Center" />
91+
<Setter Property="HorizontalAlignment" Value="Center" />
92+
</Style>
6693

6794
<Style TargetType="TextBlock" x:Key="BaseTag">
6895
<Setter Property="FontSize" Value="10" />
@@ -78,29 +105,39 @@
78105
<Style TargetType="TextBlock" x:Key="SecondaryTag" BasedOn="{StaticResource BaseTag}">
79106
<Setter Property="Canvas.Bottom" Value="0" />
80107
</Style>
108+
<Style TargetType="Label" x:Key="BaseLabelStyle">
109+
<Setter Property="Foreground" Value="{StaticResource KeyLabelForeground}" />
110+
</Style>
81111

82-
<Style TargetType="Viewbox" x:Key="LabelViewBox">
83-
<Setter Property="Height" Value="30" />
84-
<Setter Property="Stretch" Value="Uniform" />
85-
<Setter Property="StretchDirection" Value="DownOnly" />
86-
<Setter Property="VerticalAlignment" Value="Center" />
112+
<Style TargetType="Label" x:Key="LabelStyle" BasedOn="{StaticResource BaseLabelStyle}">
113+
<Setter Property="FontFamily" Value="{StaticResource InterFontFamily}" />
114+
<Setter Property="FontSize" Value="20" />
87115
</Style>
88116

89-
<Style TargetType="Grid" x:Key="ContentGridBase">
90-
<Setter Property="Canvas.Top" Value="{Binding TopKeyY}" />
91-
<Setter Property="Canvas.Left" Value="{Binding TopKeyX}" />
92-
<Setter Property="Width" Value="{Binding TopKeyWidth}" />
93-
<Setter Property="Height" Value="{Binding TopKeyHeight}" />
94-
<Setter Property="RenderTransformOrigin" Value="{Binding RotationOrigin}" />
95-
<Setter Property="RenderTransform">
96-
<Setter.Value>
97-
<TransformGroup>
98-
<RotateTransform Angle="{Binding RotationAngle}" />
99-
</TransformGroup>
100-
</Setter.Value>
101-
</Setter>
117+
<Style TargetType="Label" x:Key="GlyphStyle" BasedOn="{StaticResource BaseLabelStyle}">
118+
<Setter Property="FontFamily" Value="{StaticResource OryxFontFamily}" />
119+
<Setter Property="FontSize" Value="22" />
120+
</Style>
121+
122+
<Style TargetType="Label" x:Key="LayerGlyphStyle" BasedOn="{StaticResource GlyphStyle}">
123+
<Setter Property="FontSize" Value="30" />
124+
</Style>
125+
126+
<Style TargetType="Label" x:Key="LayerIdLabel" BasedOn="{StaticResource LabelStyle}">
127+
<Setter Property="HorizontalAlignment" Value="Center" />
128+
<Setter Property="VerticalAlignment" Value="Top" />
129+
<Setter Property="Foreground" Value="{StaticResource LayerIdForegroundBrush}" />
130+
<Setter Property="FontWeight" Value="Bold" />
131+
<Setter Property="FontSize" Value="11" />
132+
<Setter Property="Margin" Value="0 4 0 0" />
102133
</Style>
103134

135+
<DataTemplate x:Key="KeyDataTemplate">
136+
<Canvas>
137+
<Rectangle x:Name="KeyRect" Style="{DynamicResource KeyBase}" />
138+
</Canvas>
139+
</DataTemplate>
140+
104141
<DataTemplate x:Key="SimpleLabelDataTemplate">
105142
<Viewbox Style="{StaticResource LabelViewBox}">
106143
<Label Style="{StaticResource LabelStyle}" Content="{Binding Label}" />
@@ -114,21 +151,29 @@
114151
</DataTemplate>
115152

116153
<DataTemplate x:Key="ModdedGlyphDataTemplate">
117-
<Viewbox Style="{StaticResource LabelViewBox}">
118-
<Label Style="{StaticResource GlyphStyle}" Content="{Binding Label}" />
119-
</Viewbox>
154+
<StackPanel Orientation="Vertical">
155+
<Viewbox Style="{StaticResource ModifierViewBox}">
156+
<Label Style="{StaticResource LabelStyle}" Content="{Binding Modifier}" />
157+
</Viewbox>
158+
<Viewbox Style="{StaticResource ModifiedLabelViewBox}">
159+
<Label Style="{StaticResource GlyphStyle}" Content="{Binding Label}" />
160+
</Viewbox>
161+
</StackPanel>
120162
</DataTemplate>
121163

122164
<DataTemplate x:Key="LayerDataTemplate">
123165
<Viewbox Style="{StaticResource LabelViewBox}">
124-
<Label Style="{StaticResource GlyphStyle}" Content="{Binding Label}" />
166+
<Grid Style="{StaticResource LayerGrid}" HorizontalAlignment="Center" VerticalAlignment="Center">
167+
<Label Style="{StaticResource LayerGlyphStyle}" Content="{Binding Label}" />
168+
<Label Style="{StaticResource LayerIdLabel}" Content="{Binding Id}" />
169+
</Grid>
125170
</Viewbox>
126171
</DataTemplate>
127172

128173
<DataTemplate x:Key="ColorPickerDataTemplate">
129174
<Viewbox Style="{StaticResource LabelViewBox}">
130175
<Grid>
131-
<Ellipse Width="10" Height="10" Fill="{Binding ColorCode}" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0 -10 -8 0"/>
176+
<Ellipse Style="{StaticResource ColorPickerAccentStyle}" Fill="{Binding ColorCode}" />
132177
<Label Style="{StaticResource GlyphStyle}" Content="{Binding Label}" FontSize="30"/>
133178
</Grid>
134179
</Viewbox>

0 commit comments

Comments
 (0)