Browse Source

Move Acrylic materials to shared resource dictionary

pull/165/head
Ionite 1 year ago
parent
commit
b3006768f7
No known key found for this signature in database
  1. 1
      StabilityMatrix.Avalonia/App.axaml
  2. 14
      StabilityMatrix.Avalonia/Controls/PromptCard.axaml
  3. 12
      StabilityMatrix.Avalonia/Controls/SelectImageCard.axaml
  4. 11
      StabilityMatrix.Avalonia/Styles/ThemeMaterials.axaml

1
StabilityMatrix.Avalonia/App.axaml

@ -14,6 +14,7 @@
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="Styles/ThemeColors.axaml"/>
<ResourceInclude Source="Styles/ThemeMaterials.axaml"/>
<ResourceInclude Source="Styles/Card.axaml"/>
<ResourceInclude Source="Controls/CodeCompletion/CompletionListThemes.axaml"/>
</ResourceDictionary.MergedDictionaries>

14
StabilityMatrix.Avalonia/Controls/PromptCard.axaml

@ -14,16 +14,6 @@
<controls:PromptCard DataContext="{x:Static mocks:DesignData.PromptCardViewModel}"/>
</Grid>
</Design.PreviewWith>
<Styles.Resources>
<ExperimentalAcrylicMaterial
x:Key="AcrylicMaterial"
FallbackColor="{DynamicResource ThemeBackgroundColor}"
TintColor="Black"
TintOpacity="0.78"
MaterialOpacity="0.9"
BackgroundSource="Digger" />
</Styles.Resources>
<Style Selector="controls|PromptCard">
<!-- Set Defaults -->
@ -85,7 +75,7 @@
Grid.Column="0"
Grid.ColumnSpan="2"
VerticalAlignment="Stretch"
Material="{StaticResource AcrylicMaterial}"
Material="{StaticResource ThemeDarkAcrylicMaterial}"
CornerRadius="4">
<avaloniaEdit:TextEditor
@ -124,7 +114,7 @@
<ExperimentalAcrylicBorder
Grid.Row="1"
VerticalAlignment="Stretch"
Material="{StaticResource AcrylicMaterial}"
Material="{StaticResource ThemeDarkAcrylicMaterial}"
CornerRadius="4">
<avaloniaEdit:TextEditor

12
StabilityMatrix.Avalonia/Controls/SelectImageCard.axaml

@ -20,16 +20,6 @@
</Grid>
</Panel>
</Design.PreviewWith>
<Styles.Resources>
<ExperimentalAcrylicMaterial
x:Key="AcrylicMaterial"
FallbackColor="{DynamicResource ThemeBackgroundColor}"
TintColor="Black"
TintOpacity="0.78"
MaterialOpacity="0.9"
BackgroundSource="Digger" />
</Styles.Resources>
<Style Selector="controls|SelectImageCard">
<!-- Set Defaults -->
@ -44,7 +34,7 @@
<!-- Background frame -->
<ExperimentalAcrylicBorder
VerticalAlignment="Stretch"
Material="{StaticResource AcrylicMaterial}"
Material="{StaticResource ThemeDarkAcrylicMaterial}"
CornerRadius="4">
<Panel>
<!-- Image -->

11
StabilityMatrix.Avalonia/Styles/ThemeMaterials.axaml

@ -0,0 +1,11 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<ExperimentalAcrylicMaterial
x:Key="ThemeDarkAcrylicMaterial"
FallbackColor="{DynamicResource ThemeBackgroundColor}"
TintColor="Black"
TintOpacity="0.78"
MaterialOpacity="0.9"
BackgroundSource="Digger" />
</ResourceDictionary>
Loading…
Cancel
Save