Skip to content

Commit d328c66

Browse files
authored
Merge pull request #508 from irihitech/token
Separate the basic token color resources
2 parents ec9233c + 049552f commit d328c66

File tree

100 files changed

+1011
-1171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1011
-1171
lines changed

demo/Semi.Avalonia.Demo/App.axaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
xmlns:semi="https://irihi.tech/semi">
66
<Application.Styles>
77
<!-- You can still reference in old way. -->
8-
<!-- <StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" /> -->
9-
<semi:SemiTheme Locale="zh-cn" />
8+
<!-- <StyleInclude Source="avares://Semi.Avalonia/Index.axaml" /> -->
9+
<semi:SemiTheme Locale="zh-CN" />
1010
<semi:SemiPopupAnimations/>
1111
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
1212
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />

demo/Semi.Avalonia.Demo/Pages/GridSplitterDemo.axaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
RowDefinitions="*, Auto, *">
1515
<Border
1616
HorizontalAlignment="Stretch"
17-
Background="{DynamicResource SemiYellow3Color}"
17+
Background="{DynamicResource SemiGrey0Color}"
1818
CornerRadius="10" />
1919
<GridSplitter Grid.Row="1" ShowsPreview="True" />
2020
<Border
2121
Grid.Row="2"
2222
HorizontalAlignment="Stretch"
23-
Background="{DynamicResource SemiYellow3Color}"
23+
Background="{DynamicResource SemiGrey0Color}"
2424
CornerRadius="10" />
2525
</Grid>
2626
<Grid
@@ -29,13 +29,13 @@
2929
ColumnDefinitions="*, Auto, *">
3030
<Border
3131
HorizontalAlignment="Stretch"
32-
Background="{DynamicResource SemiYellow3Color}"
32+
Background="{DynamicResource SemiGrey0Color}"
3333
CornerRadius="10" />
3434
<GridSplitter Grid.Column="1" ShowsPreview="True" />
3535
<Border
3636
Grid.Column="2"
3737
HorizontalAlignment="Stretch"
38-
Background="{DynamicResource SemiYellow3Color}"
38+
Background="{DynamicResource SemiGrey0Color}"
3939
CornerRadius="10" />
4040
</Grid>
4141
</StackPanel>

demo/Semi.Avalonia.Demo/ViewModels/PaletteDemoViewModel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Avalonia.Media;
66
using CommunityToolkit.Mvvm.ComponentModel;
77
using CommunityToolkit.Mvvm.Messaging;
8+
using Semi.Avalonia.Tokens.Palette;
89

910
namespace Semi.Avalonia.Demo.ViewModels;
1011

@@ -51,8 +52,8 @@ public ObservableCollection<ColorListViewModel>? DarkLists
5152

5253
public PaletteDemoViewModel()
5354
{
54-
_lightResourceDictionary = new Light.Palette();
55-
_darkResourceDictionary = new Dark.Palette();
55+
_lightResourceDictionary = new Light();
56+
_darkResourceDictionary = new Dark();
5657
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
5758
}
5859

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
1+
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2+
xmlns:semi="https://irihi.tech/semi">
23
<Styles.Resources>
34
<ResourceDictionary>
45
<ResourceDictionary.ThemeDictionaries>
5-
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia/Themes/Light/_index.axaml" />
6-
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia/Themes/Dark/_index.axaml" />
6+
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia/Schemes/LightScheme.axaml" />
7+
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia/Schemes/DarkScheme.axaml" />
8+
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Aquatic}" Source="avares://Semi.Avalonia/Schemes/AquaticScheme.axaml" />
9+
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Desert}" Source="avares://Semi.Avalonia/Schemes/DesertScheme.axaml" />
10+
<ResourceInclude x:Key="{x:Static semi:SemiTheme.Dusk}" Source="avares://Semi.Avalonia/Schemes/DuskScheme.axaml" />
11+
<ResourceInclude x:Key="{x:Static semi:SemiTheme.NightSky}" Source="avares://Semi.Avalonia/Schemes/NightSkyScheme.axaml" />
712
</ResourceDictionary.ThemeDictionaries>
813
<ResourceDictionary.MergedDictionaries>
914
<ResourceInclude Source="avares://Semi.Avalonia/Controls/_index.axaml" />
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2+
<ResourceDictionary.MergedDictionaries>
3+
<ResourceInclude Source="avares://Semi.Avalonia/Tokens/HighContrast/Aquatic.axaml" />
4+
<ResourceInclude Source="avares://Semi.Avalonia/Themes/HighContrast/_index.axaml" />
5+
</ResourceDictionary.MergedDictionaries>
6+
</ResourceDictionary>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2+
<ResourceDictionary.MergedDictionaries>
3+
<ResourceInclude Source="avares://Semi.Avalonia/Tokens/Palette/Dark.axaml" />
4+
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/_index.axaml" />
5+
</ResourceDictionary.MergedDictionaries>
6+
</ResourceDictionary>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2+
<ResourceDictionary.MergedDictionaries>
3+
<ResourceInclude Source="avares://Semi.Avalonia/Tokens/HighContrast/Desert.axaml" />
4+
<ResourceInclude Source="avares://Semi.Avalonia/Themes/HighContrast/_index.axaml" />
5+
</ResourceDictionary.MergedDictionaries>
6+
</ResourceDictionary>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2+
<ResourceDictionary.MergedDictionaries>
3+
<ResourceInclude Source="avares://Semi.Avalonia/Tokens/HighContrast/Dusk.axaml" />
4+
<ResourceInclude Source="avares://Semi.Avalonia/Themes/HighContrast/_index.axaml" />
5+
</ResourceDictionary.MergedDictionaries>
6+
</ResourceDictionary>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2+
<ResourceDictionary.MergedDictionaries>
3+
<ResourceInclude Source="avares://Semi.Avalonia/Tokens/Palette/Light.axaml" />
4+
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/_index.axaml" />
5+
</ResourceDictionary.MergedDictionaries>
6+
</ResourceDictionary>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2+
<ResourceDictionary.MergedDictionaries>
3+
<ResourceInclude Source="avares://Semi.Avalonia/Tokens/HighContrast/NightSky.axaml" />
4+
<ResourceInclude Source="avares://Semi.Avalonia/Themes/HighContrast/_index.axaml" />
5+
</ResourceDictionary.MergedDictionaries>
6+
</ResourceDictionary>

0 commit comments

Comments
 (0)