mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-04 16:16:34 +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
|
## Installation
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia --version 11.0.7
|
dotnet add package Semi.Avalonia
|
||||||
```
|
```
|
||||||
Include Semi Design Styles in application:
|
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.
|
ColorPicker, DataGrid and TreeDataGrid are distributed in separated packages. Please install if you need.
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia.ColorPicker --version 11.0.7
|
dotnet add package Semi.Avalonia.ColorPicker
|
||||||
dotnet add package Semi.Avalonia.DataGrid --version 11.0.7
|
dotnet add package Semi.Avalonia.DataGrid
|
||||||
dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.7
|
dotnet add package Semi.Avalonia.TreeDataGrid
|
||||||
```
|
```
|
||||||
```xaml
|
```xaml
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "7.0"
|
"version": "8.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Version>11.0.7.2</Version>
|
<Version>11.0.7.4</Version>
|
||||||
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
<Authors>IRIHI Technology Co., Ltd.</Authors>
|
||||||
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
<Description>Avalonia Theme inspired by Semi Design.</Description>
|
||||||
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
|
<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}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -166,8 +166,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -275,8 +275,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -315,8 +315,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -457,8 +457,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -512,8 +512,8 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^ /template/ Path#CheckGlyph">
|
<Style Selector="^ /template/ PathIcon#CheckGlyph">
|
||||||
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@@ -147,6 +147,7 @@
|
|||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="{TemplateBinding Header}"
|
Content="{TemplateBinding Header}"
|
||||||
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="PART_InputGestureText"
|
x:Name="PART_InputGestureText"
|
||||||
@@ -267,6 +268,7 @@
|
|||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="{TemplateBinding Header}"
|
Content="{TemplateBinding Header}"
|
||||||
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
<Popup
|
<Popup
|
||||||
Name="PART_Popup"
|
Name="PART_Popup"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:CompileBindings="True">
|
x:CompileBindings="True">
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AdornerLayer.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AutoCompleteBox.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AutoCompleteBox.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Border.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Border.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Button.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>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Palette.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Palette.axaml" />
|
||||||
<!-- Controls -->
|
<!-- 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/AutoCompleteBox.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Border.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Border.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Button.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>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Palette.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Palette.axaml" />
|
||||||
<!-- Controls -->
|
<!-- 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/AutoCompleteBox.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Border.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Border.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Button.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>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Palette.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Palette.axaml" />
|
||||||
<!-- Controls -->
|
<!-- 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/AutoCompleteBox.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Border.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Border.axaml" />
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Button.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Button.axaml" />
|
||||||
|
|||||||
Reference in New Issue
Block a user