Skip to content

Commit

Permalink
Merge pull request #170 from irihitech/main
Browse files Browse the repository at this point in the history
Preview 7 release
  • Loading branch information
rabbitism authored Apr 25, 2023
2 parents a425bce + 1767682 commit 0f6aed9
Show file tree
Hide file tree
Showing 33 changed files with 200 additions and 116 deletions.
6 changes: 6 additions & 0 deletions .run/SC-Single.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="SC-Single" type="DotNetFolderPublish" factoryName="Publish to folder">
<riderPublish configuration="Release" include_native_libs_for_self_extract="true" platform="Any CPU" produce_single_file="true" runtime="win-x64" self_contained="true" target_folder="$PROJECT_DIR$/demo/Semi.Avalonia.Demo.Desktop/bin/Release/net7.0/win-x64/publish" target_framework="net7.0" uuid_high="3088527218258560748" uuid_low="-8649338673481336678" />
<method v="2" />
</configuration>
</component>
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-preview6.1
dotnet add package Semi.Avalonia --version 0.1.0-preview7
```
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-preview6.1
dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview6.1
dotnet add package Semi.Avalonia.ColorPicker --version 0.1.0-preview7
dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview7
```
```xaml
<Application.Styles>
Expand All @@ -47,6 +47,7 @@ https://github.com/irihitech/Semi.Avalonia/releases
| 0.1.0-preview3 | 11.0-preview4 |
| 0.1.0-preview5.x | 11.0-preview5 |
| 0.1.0-preview6.x | 11.0-preview6 |
| 0.1.0-preview7.x | 11.0-preview7 |

**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-preview4</AvaloniaVersion>
<AvaloniaVersion>11.0.0-preview7</AvaloniaVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
<RootNamespace>Semi.Avalonia.Demo.Android</RootNamespace>
</PropertyGroup>

<Import Project="../Directory.Build.props" />

<ItemGroup>
<PackageReference Include="Avalonia.Android" Version="11.0.0-preview6" />
<PackageReference Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
</PropertyGroup>

<ItemGroup>
<RdXmlFile Include="rd.xml"/>
<RdXmlFile Include="rd.xml" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview6" />
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview6" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Browser" Version="11.0.0-preview6" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview6" />
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 4 additions & 2 deletions demo/Semi.Avalonia.Demo/Controls/ColorDetailControl.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Globalization;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Input.Platform;
using Avalonia.Media;
Expand Down Expand Up @@ -95,11 +96,12 @@ public async void Copy(object o)
}
}

if (Application.Current is { Clipboard: { } c })
var toplevel = TopLevel.GetTopLevel(this);
if (toplevel?.Clipboard is { } c)
{
await c.SetTextAsync(text??string.Empty);
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Theme="{DynamicResource TitleTextBlock}" />
<TabControl Grid.Row="1">
<TabItem Header="Light">
<DataGrid IsReadOnly="True" Items="{TemplateBinding LightColors}">
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding LightColors}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="70" Header="Color">
<DataGridTemplateColumn.CellTemplate>
Expand Down Expand Up @@ -77,7 +77,7 @@
</DataGrid>
</TabItem>
<TabItem Header="Dark">
<DataGrid IsReadOnly="True" Items="{TemplateBinding DarkColors}">
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding DarkColors}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="70" Header="Color">
<DataGridTemplateColumn.CellTemplate>
Expand Down
10 changes: 5 additions & 5 deletions demo/Semi.Avalonia.Demo/Pages/AutoCompleteBoxDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</Style>
</StackPanel.Styles>
<AutoCompleteBox
Items="{Binding States}"
ItemsSource="{Binding States}"
ValueMemberBinding="{Binding Name}"
Watermark="Please select a State">
<AutoCompleteBox.ItemTemplate>
Expand All @@ -31,7 +31,7 @@
</AutoCompleteBox>
<AutoCompleteBox
Classes="Large"
Items="{Binding States}"
ItemsSource="{Binding States}"
ValueMemberBinding="{ReflectionBinding Name}">
<AutoCompleteBox.ItemTemplate>
<DataTemplate DataType="local:StateData">
Expand All @@ -41,7 +41,7 @@
</AutoCompleteBox>
<AutoCompleteBox
Classes="Small"
Items="{Binding States}"
ItemsSource="{Binding States}"
ValueMemberBinding="{ReflectionBinding Name}">
<AutoCompleteBox.ItemTemplate>
<DataTemplate DataType="local:StateData">
Expand All @@ -51,7 +51,7 @@
</AutoCompleteBox>
<AutoCompleteBox
Classes="Bordered"
Items="{Binding States}"
ItemsSource="{Binding States}"
ValueMemberBinding="{ReflectionBinding Name}">
<AutoCompleteBox.ItemTemplate>
<DataTemplate DataType="local:StateData">
Expand All @@ -61,7 +61,7 @@
</AutoCompleteBox>
<AutoCompleteBox
IsEnabled="False"
Items="{Binding States}"
ItemsSource="{Binding States}"
ValueMemberBinding="{ReflectionBinding Name}"
Watermark="Disabled">
<AutoCompleteBox.ItemTemplate>
Expand Down
2 changes: 1 addition & 1 deletion demo/Semi.Avalonia.Demo/Pages/DataGridDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
Name="dataGridEdit"
Grid.Row="1"
Margin="12"
Items="{Binding DataGrid3Source}">
ItemsSource="{Binding DataGrid3Source}">
<DataGrid.Columns>
<DataGridTextColumn
Width="2*"
Expand Down
4 changes: 2 additions & 2 deletions demo/Semi.Avalonia.Demo/Pages/DataGridDemo.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ public DataGridDemo()
collectionView1.SortDescriptions.Add(dataGridSortDescription);
}
};
dg1.Items = collectionView1;
dg1.ItemsSource = collectionView1;

var dg2 = this.Get<DataGrid>("dataGridGrouping");
dg2.IsReadOnly = true;

var collectionView2 = new DataGridCollectionView(Countries.All);
collectionView2.GroupDescriptions.Add(new DataGridPathGroupDescription("Region"));

dg2.Items = collectionView2;
dg2.ItemsSource = collectionView2;

var dg3 = this.Get<DataGrid>("dataGridEdit");
dg3.IsReadOnly = false;
Expand Down
2 changes: 1 addition & 1 deletion demo/Semi.Avalonia.Demo/Pages/ExpanderDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<Button Content="Hello Avalonia World!" />
</Expander>
</StackPanel>
<Grid ColumnDefinitions="* *">
<Grid ColumnDefinitions="*, *">
<Expander
Height="200"
ExpandDirection="Right"
Expand Down
4 changes: 2 additions & 2 deletions demo/Semi.Avalonia.Demo/Pages/FlyoutDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<Grid
HorizontalAlignment="Center"
VerticalAlignment="Center"
ColumnDefinitions="* * * * *"
RowDefinitions="* * * * *">
ColumnDefinitions="*, *, *, *, *"
RowDefinitions="*, *, *, *, *">
<Button
Grid.Row="0"
Grid.Column="1"
Expand Down
12 changes: 6 additions & 6 deletions demo/Semi.Avalonia.Demo/Pages/Overview.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@
</StackPanel>
</CheckBox>
<CheckBox
IsChecked="True"
Margin="4"
IsChecked="True"
Theme="{StaticResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 2</TextBlock>
<TextBlock Classes="Tertiary">Description 2</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox
IsThreeState="True"
IsChecked="{x:Null}"
Margin="4"
IsChecked="{x:Null}"
IsThreeState="True"
Theme="{StaticResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 3</TextBlock>
Expand All @@ -123,8 +123,8 @@
</StackPanel>
</CheckBox>
<CheckBox
IsChecked="True"
Margin="4"
IsChecked="True"
Theme="{StaticResource PureCardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 2</TextBlock>
Expand All @@ -133,8 +133,8 @@
</CheckBox>
<CheckBox
Margin="4"
IsThreeState="True"
IsChecked="{x:Null}"
IsThreeState="True"
Theme="{StaticResource PureCardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 3</TextBlock>
Expand Down Expand Up @@ -179,7 +179,7 @@
<TimePicker />
<CalendarDatePicker />
</StackPanel>
<Grid ColumnDefinitions="* * *">
<Grid ColumnDefinitions="*, *, *">
<Border Theme="{StaticResource CardBorder}">
<TextBlock>Card</TextBlock>
</Border>
Expand Down
10 changes: 5 additions & 5 deletions demo/Semi.Avalonia.Demo/Pages/PaletteDemo.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@
Theme="{DynamicResource TitleTextBlock}" />
<TabControl>
<TabItem Header="Light">
<ItemsControl Margin="16" Items="{Binding LightLists}">
<ItemsControl Margin="16" ItemsSource="{Binding LightLists}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="viewModels:ColorListViewModel">
<ItemsControl Margin="4,0" Items="{Binding Color}">
<ItemsControl Margin="4,0" ItemsSource="{Binding Color}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="viewModels:ColorItemViewModel">
<controls:ColorItemControl
Expand All @@ -87,15 +87,15 @@
</ItemsControl>
</TabItem>
<TabItem Header="Dark">
<ItemsControl Margin="16" Items="{Binding DarkLists}">
<ItemsControl Margin="16" ItemsSource="{Binding DarkLists}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="viewModels:ColorListViewModel">
<ItemsControl Margin="4,0" Items="{Binding Color}">
<ItemsControl Margin="4,0" ItemsSource="{Binding Color}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="viewModels:ColorItemViewModel">
<controls:ColorItemControl
Expand All @@ -112,7 +112,7 @@
</TabItem>
</TabControl>

<ItemsControl Items="{Binding FunctionalColors}">
<ItemsControl ItemsSource="{Binding FunctionalColors}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<!-- -->
Expand Down
8 changes: 4 additions & 4 deletions demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<AvaloniaResource Include="Assets\**" />
<TrimmerRootDescriptor Include="Roots.xml" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0-preview6" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0-preview6" />
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview6" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
</ItemGroup>

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-preview6.1</Version>
<Version>0.1.0-preview7</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-preview6</AvaloniaVersion>
<AvaloniaVersion>11.0.0-preview7</AvaloniaVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
Margin="12"
VerticalAlignment="Stretch"
ItemContainerTheme="{DynamicResource ColorViewPaletteListBoxItemTheme}"
Items="{TemplateBinding PaletteColors}"
ItemsSource="{TemplateBinding PaletteColors}"
SelectedItem="{Binding Color, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoNothingForNullConverter}, Mode=TwoWay}"
Theme="{DynamicResource ColorViewPaletteListBoxTheme}"
UseLayoutRounding="False">
Expand Down
Loading

0 comments on commit 0f6aed9

Please sign in to comment.