mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 00:00:55 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8005997332 | ||
|
|
ae0375f194 | ||
|
|
28b04705aa | ||
|
|
84a255656b | ||
|
|
11c3109ae1 | ||
|
|
34674599ec |
@@ -9,7 +9,7 @@ Avalonia Theme inspired by Semi Design
|
||||
|
||||
## Installation
|
||||
```bash
|
||||
dotnet add package Semi.Avalonia --version 11.0.7
|
||||
dotnet add package Semi.Avalonia
|
||||
```
|
||||
Include Semi Design Styles in application:
|
||||
|
||||
@@ -23,9 +23,9 @@ That's all.
|
||||
|
||||
ColorPicker, DataGrid and TreeDataGrid are distributed in separated packages. Please install if you need.
|
||||
```bash
|
||||
dotnet add package Semi.Avalonia.ColorPicker --version 11.0.7
|
||||
dotnet add package Semi.Avalonia.DataGrid --version 11.0.7
|
||||
dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.7
|
||||
dotnet add package Semi.Avalonia.ColorPicker
|
||||
dotnet add package Semi.Avalonia.DataGrid
|
||||
dotnet add package Semi.Avalonia.TreeDataGrid
|
||||
```
|
||||
```xaml
|
||||
<Application.Styles>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "7.0"
|
||||
"version": "8.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Version>11.0.7.2</Version>
|
||||
<Version>11.0.7.4</Version>
|
||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
||||
|
||||
16
src/Semi.Avalonia/Controls/AdornerLayer.axaml
Normal file
16
src/Semi.Avalonia/Controls/AdornerLayer.axaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:ClassModifier="internal">
|
||||
<ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer">
|
||||
<Setter Property="DefaultFocusAdorner">
|
||||
<FocusAdornerTemplate>
|
||||
<Rectangle
|
||||
Margin="{DynamicResource AdornerLayerMargin}"
|
||||
Stroke="{DynamicResource AdornerLayerBackground}"
|
||||
StrokeDashArray="1,2"
|
||||
StrokeThickness="{DynamicResource AdornerLayerThickness}" />
|
||||
</FocusAdornerTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -123,8 +123,8 @@
|
||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
@@ -166,8 +166,8 @@
|
||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
@@ -275,8 +275,8 @@
|
||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
@@ -315,8 +315,8 @@
|
||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
@@ -457,8 +457,8 @@
|
||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
@@ -512,8 +512,8 @@
|
||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||
</Style>
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
@@ -147,6 +147,7 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||
RecognizesAccessKey="True" />
|
||||
<TextBlock
|
||||
x:Name="PART_InputGestureText"
|
||||
@@ -267,6 +268,7 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding Header}"
|
||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||
RecognizesAccessKey="True" />
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AdornerLayer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AutoCompleteBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Border.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Button.axaml" />
|
||||
|
||||
3
src/Semi.Avalonia/Themes/Dark/AdornerLayer.axaml
Normal file
3
src/Semi.Avalonia/Themes/Dark/AdornerLayer.axaml
Normal file
@@ -0,0 +1,3 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="AdornerLayerBackground" Color="White" />
|
||||
</ResourceDictionary>
|
||||
@@ -2,6 +2,7 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Palette.axaml" />
|
||||
<!-- Controls -->
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/AdornerLayer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Border.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Button.axaml" />
|
||||
|
||||
3
src/Semi.Avalonia/Themes/Light/AdornerLayer.axaml
Normal file
3
src/Semi.Avalonia/Themes/Light/AdornerLayer.axaml
Normal file
@@ -0,0 +1,3 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="AdornerLayerBackground" Color="#1C1F23" />
|
||||
</ResourceDictionary>
|
||||
@@ -2,6 +2,7 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Palette.axaml" />
|
||||
<!-- Controls -->
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/AdornerLayer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/AutoCompleteBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Border.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Button.axaml" />
|
||||
|
||||
4
src/Semi.Avalonia/Themes/Shared/AdornerLayer.axaml
Normal file
4
src/Semi.Avalonia/Themes/Shared/AdornerLayer.axaml
Normal file
@@ -0,0 +1,4 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Thickness x:Key="AdornerLayerMargin">1</Thickness>
|
||||
<x:Double x:Key="AdornerLayerThickness">1</x:Double>
|
||||
</ResourceDictionary>
|
||||
@@ -2,6 +2,7 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Palette.axaml" />
|
||||
<!-- Controls -->
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/AdornerLayer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/AutoCompleteBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Border.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Button.axaml" />
|
||||
|
||||
Reference in New Issue
Block a user