Skip to content

Commit

Permalink
Merge pull request #184 from irihitech/preview8
Browse files Browse the repository at this point in the history
Preview 8
  • Loading branch information
zdpcdt authored May 9, 2023
2 parents e556c8e + a4b9d87 commit 503af76
Show file tree
Hide file tree
Showing 15 changed files with 120 additions and 109 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Avalonia Theme inspired by Semi Design

## Installation
```bash
dotnet add package Semi.Avalonia --version 0.1.0-preview7
dotnet add package Semi.Avalonia --version 0.1.0-preview8
```
Include Semi Design Styles in application:

Expand All @@ -25,8 +25,8 @@ That's all.

DataGrid and ColorPicker are distributed in separated packages. Please install if you need.
```bash
dotnet add package Semi.Avalonia.ColorPicker --version 0.1.0-preview7
dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview7
dotnet add package Semi.Avalonia.ColorPicker --version 0.1.0-preview8
dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview8
```
```xaml
<Application.Styles>
Expand All @@ -48,6 +48,7 @@ https://github.com/irihitech/Semi.Avalonia/releases
| 0.1.0-preview5.x | 11.0-preview5 |
| 0.1.0-preview6.x | 11.0-preview6 |
| 0.1.0-preview7.x | 11.0-preview7 |
| 0.1.0-preview8.x | 11.0-preview8 |

**NOTE**

Expand Down
2 changes: 1 addition & 1 deletion demo/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.0.0-preview7</AvaloniaVersion>
<AvaloniaVersion>11.0.0-preview8</AvaloniaVersion>
</PropertyGroup>
</Project>
28 changes: 10 additions & 18 deletions demo/Semi.Avalonia.Demo/Controls/FunctionalColorGroupControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,52 +23,48 @@
<DataGrid.Columns>
<DataGridTemplateColumn Width="70" Header="Color">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<DataTemplate DataType="viewModels:ColorItemViewModel">
<controls:ColorItemControl
Width="40"
Height="20"
x:DataType="viewModels:ColorItemViewModel"
Background="{Binding Brush}"
CornerRadius="3" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="*" Header="ResourceKey">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock
Margin="12,0,12,0"
VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding ResourceKey}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn
Width="*"
x:DataType="viewModels:ColorItemViewModel"
Binding="{Binding ColorDisplayName}"
Binding="{ReflectionBinding ColorDisplayName}"
CanUserSort="False"
Header="Name" />
<DataGridTemplateColumn Width="100" Header="Hex">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock
Margin="12,0,12,0"
VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding Hex}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80" Header="Opacity">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock
Margin="12,0,12,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding Brush.Opacity}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
Expand All @@ -81,52 +77,48 @@
<DataGrid.Columns>
<DataGridTemplateColumn Width="70" Header="Color">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<DataTemplate DataType="viewModels:ColorItemViewModel">
<controls:ColorItemControl
Width="40"
Height="20"
x:DataType="viewModels:ColorItemViewModel"
Background="{Binding Brush}"
CornerRadius="3" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="*" Header="ResourceKey">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock
Margin="12,0,12,0"
VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding ResourceKey}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn
Width="*"
x:DataType="viewModels:ColorItemViewModel"
Binding="{Binding ColorDisplayName}"
Binding="{ReflectionBinding ColorDisplayName}"
CanUserSort="False"
Header="Name" />
<DataGridTemplateColumn Width="100" Header="Hex">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock
Margin="12,0,12,0"
VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding Hex}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80" Header="Opacity">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock
Margin="12,0,12,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding Brush.Opacity}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
Expand Down
4 changes: 2 additions & 2 deletions src/Package.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>10</LangVersion>
<Version>0.1.0-preview7</Version>
<Version>0.1.0-preview8</Version>
<Authors>IRIHI Technology</Authors>
<Description>Avalonia Theme inspired by Semi Design. </Description>
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
<AvaloniaVersion>11.0.0-preview7</AvaloniaVersion>
<AvaloniaVersion>11.0.0-preview8</AvaloniaVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
</Project>
14 changes: 9 additions & 5 deletions src/Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
Orientation="Vertical">
<primitives:ColorSlider.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding>
</primitives:ColorSlider.IsVisible>
</primitives:ColorSlider>
Expand Down Expand Up @@ -323,6 +323,7 @@
Margin="0,0,12,0"
VerticalAlignment="Center"
AllowSpin="True"
Classes="Small"
IsVisible="{TemplateBinding IsComponentTextInputVisible}"
Maximum="{Binding Maximum, ElementName=Component1Slider}"
Minimum="{Binding Minimum, ElementName=Component1Slider}"
Expand Down Expand Up @@ -353,6 +354,7 @@
Margin="0,0,12,0"
VerticalAlignment="Center"
AllowSpin="True"
Classes="Small"
IsVisible="{TemplateBinding IsComponentTextInputVisible}"
Maximum="{Binding Maximum, ElementName=Component2Slider}"
Minimum="{Binding Minimum, ElementName=Component2Slider}"
Expand Down Expand Up @@ -383,6 +385,7 @@
Margin="0,0,12,0"
VerticalAlignment="Center"
AllowSpin="True"
Classes="Small"
IsVisible="{TemplateBinding IsComponentTextInputVisible}"
Maximum="{Binding Maximum, ElementName=Component3Slider}"
Minimum="{Binding Minimum, ElementName=Component3Slider}"
Expand Down Expand Up @@ -413,6 +416,7 @@
Margin="0,0,12,0"
VerticalAlignment="Center"
AllowSpin="True"
Classes="Small"
IsEnabled="{TemplateBinding IsAlphaEnabled}"
Maximum="{Binding Maximum, ElementName=AlphaComponentSlider}"
Minimum="{Binding Minimum, ElementName=AlphaComponentSlider}"
Expand All @@ -421,8 +425,8 @@
Value="{Binding Value, ElementName=AlphaComponentSlider}">
<NumericUpDown.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="IsComponentTextInputVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<ReflectionBinding Path="IsComponentTextInputVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding>
</NumericUpDown.IsVisible>
</NumericUpDown>
Expand All @@ -443,8 +447,8 @@
TickFrequency="1">
<primitives:ColorSlider.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<ReflectionBinding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding>
</primitives:ColorSlider.IsVisible>
</primitives:ColorSlider>
Expand Down
Loading

0 comments on commit 503af76

Please sign in to comment.