Browse Source

avalonia: Did some style and layouting stuff

Kenric Nugteren 1 week ago
parent
commit
1577c51688

+ 5 - 0
InABox.Avalonia/Theme/Classes/Image.axaml

@@ -1,6 +1,11 @@
 <Styles xmlns="https://github.com/avaloniaui"
 <Styles xmlns="https://github.com/avaloniaui"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     
     
+    <Style Selector="Image.ExtraSmall">
+        <Setter Property="Height" Value="{DynamicResource PrsExtraSmallImageHeight}" />
+        <Setter Property="Width" Value="{DynamicResource PrsExtraSmallImageWidth}" />
+    </Style>
+    
     <Style Selector="Image.Small">
     <Style Selector="Image.Small">
         <Setter Property="Height" Value="{DynamicResource PrsSmallImageHeight}" />
         <Setter Property="Height" Value="{DynamicResource PrsSmallImageHeight}" />
         <Setter Property="Width" Value="{DynamicResource PrsSmallImageWidth}" />
         <Setter Property="Width" Value="{DynamicResource PrsSmallImageWidth}" />

+ 3 - 0
InABox.Avalonia/Theme/Classes/Label.axaml

@@ -27,4 +27,7 @@
         <Setter Property="FontSize" Value="{DynamicResource PrsFontSizeExtraLarge}" />
         <Setter Property="FontSize" Value="{DynamicResource PrsFontSizeExtraLarge}" />
     </Style>
     </Style>
 
 
+    <Style Selector="Label.Bold">
+        <Setter Property="FontWeight" Value="{DynamicResource PrsFontWeightBold}" />
+    </Style>
 </Styles>
 </Styles>

+ 33 - 0
InABox.Avalonia/Theme/Classes/TextBlock.axaml

@@ -0,0 +1,33 @@
+<Styles xmlns="https://github.com/avaloniaui"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <Design.PreviewWith>
+        <Border Padding="20">
+            <!-- Add Controls for Previewer Here -->
+        </Border>
+    </Design.PreviewWith>
+
+    <Style Selector="TextBlock.ExtraSmall">
+        <Setter Property="FontSize" Value="{DynamicResource PrsFontSizeExtraSmall}" />
+    </Style>
+
+    <Style Selector="TextBlock.Small">
+        <Setter Property="FontSize" Value="{DynamicResource PrsFontSizeSmall}" />
+    </Style>
+
+    <Style Selector="TextBlock.Large">
+        <Setter Property="FontSize" Value="{DynamicResource PrsFontSizeLarge}" />
+    </Style>
+
+    <Style Selector="TextBlock.ExtraLarge">
+        <Setter Property="FontSize" Value="{DynamicResource PrsFontSizeExtraLarge}" />
+    </Style>
+
+    <Style Selector="TextBlock.Bold">
+        <Setter Property="FontWeight" Value="{DynamicResource PrsFontWeightBold}" />
+    </Style>
+
+    <Style Selector="TextBlock.Italic">
+        <Setter Property="FontStyle" Value="{DynamicResource PrsFontStylItalic}" />
+    </Style>
+
+</Styles>

+ 3 - 0
InABox.Avalonia/Theme/Layouts.axaml

@@ -17,6 +17,9 @@
     
     
     <CornerRadius x:Key="PrsCornerRadius">4</CornerRadius>
     <CornerRadius x:Key="PrsCornerRadius">4</CornerRadius>
 
 
+    <system:Double x:Key="PrsExtraSmallImageWidth">16</system:Double>
+    <system:Double x:Key="PrsExtraSmallImageHeight">16</system:Double>
+
     <system:Double x:Key="PrsSmallImageWidth">20</system:Double>
     <system:Double x:Key="PrsSmallImageWidth">20</system:Double>
     <system:Double x:Key="PrsSmallImageHeight">20</system:Double>
     <system:Double x:Key="PrsSmallImageHeight">20</system:Double>
 
 

+ 1 - 0
InABox.Avalonia/Theme/Styles.axaml

@@ -15,6 +15,7 @@
 	<StyleInclude Source="/Theme/Classes/Separator.axaml" />
 	<StyleInclude Source="/Theme/Classes/Separator.axaml" />
 	<StyleInclude Source="/Theme/Classes/TabItem.axaml" />
 	<StyleInclude Source="/Theme/Classes/TabItem.axaml" />
 	<StyleInclude Source="/Theme/Classes/TabStrip.axaml" />
 	<StyleInclude Source="/Theme/Classes/TabStrip.axaml" />
+	<StyleInclude Source="/Theme/Classes/TextBlock.axaml" />
 	<StyleInclude Source="/Theme/Classes/TextBox.axaml" />
 	<StyleInclude Source="/Theme/Classes/TextBox.axaml" />
 	<StyleInclude Source="/Theme/Classes/TimeSelectorButton.axaml" />
 	<StyleInclude Source="/Theme/Classes/TimeSelectorButton.axaml" />
 	<StyleInclude Source="/Theme/Classes/ZoomPanel.axaml" />
 	<StyleInclude Source="/Theme/Classes/ZoomPanel.axaml" />