mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-05-01 21:41:27 +08:00
fix: fix palette trimming issue.
This commit is contained in:
@@ -47,8 +47,8 @@ public class PaletteDemoViewModel: ObservableObject
|
|||||||
|
|
||||||
public PaletteDemoViewModel()
|
public PaletteDemoViewModel()
|
||||||
{
|
{
|
||||||
_lightResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Light/Palette.axaml")) as ResourceDictionary;
|
_lightResourceDictionary = new Light.Palette();
|
||||||
_darkResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Dark/Palette.axaml")) as ResourceDictionary;
|
_darkResourceDictionary = new Dark.Palette();
|
||||||
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
|
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary x:Class="Semi.Avalonia.Dark.Palette" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<!-- Color Resources -->
|
<!-- Color Resources -->
|
||||||
<Color x:Key="SemiRed0Color">#6C090B</Color>
|
<Color x:Key="SemiRed0Color">#6C090B</Color>
|
||||||
<Color x:Key="SemiRed1Color">#901110</Color>
|
<Color x:Key="SemiRed1Color">#901110</Color>
|
||||||
|
|||||||
9
src/Semi.Avalonia/Themes/Dark/Palette.axaml.cs
Normal file
9
src/Semi.Avalonia/Themes/Dark/Palette.axaml.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Dark;
|
||||||
|
|
||||||
|
public class Palette: ResourceDictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary x:Class="Semi.Avalonia.Light.Palette" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<!-- Color Resources -->
|
<!-- Color Resources -->
|
||||||
<Color x:Key="SemiRed0Color">#FEF2ED</Color>
|
<Color x:Key="SemiRed0Color">#FEF2ED</Color>
|
||||||
<Color x:Key="SemiRed1Color">#FEDDD2</Color>
|
<Color x:Key="SemiRed1Color">#FEDDD2</Color>
|
||||||
|
|||||||
9
src/Semi.Avalonia/Themes/Light/Palette.axaml.cs
Normal file
9
src/Semi.Avalonia/Themes/Light/Palette.axaml.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Light;
|
||||||
|
|
||||||
|
public class Palette: ResourceDictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user