Compare commits

...

23 Commits

Author SHA1 Message Date
Zhang Dian
ed1b417332 Merge pull request #141 from irihitech/140-menu-open
Various fixes after preview 6
2023-03-22 15:50:11 +08:00
rabbitism
c28ff754f5 fix: fix expand icon color. 2023-03-22 15:34:02 +08:00
rabbitism
2aea7b3e84 fix: fix various placement issue. 2023-03-22 14:54:48 +08:00
Zhang Dian
c7fc804ec1 Merge pull request #137 from irihitech/preview6
Upgrade to Preview6
2023-03-22 14:14:50 +08:00
rabbitism
cd533c65bc fix: fix toggle switch font size. 2023-03-22 13:25:07 +08:00
rabbitism
b0cba0e5a9 misc: update release info. 2023-03-22 12:58:23 +08:00
rabbitism
5a9596a2be fix: a temporary fix of grid splitter preview. 2023-03-22 12:24:49 +08:00
rabbitism
33db3bf0d4 fix: fix carousel collection conversion. 2023-03-22 12:02:02 +08:00
rabbitism
3473c754a2 fix: fix toggle switch foreground issue. 2023-03-22 11:50:38 +08:00
rabbitism
34f0e53627 fix: fix date/time picker color. 2023-03-22 11:49:28 +08:00
rabbitism
4f28569781 fix: fix menu button foreground issue. 2023-03-22 11:43:31 +08:00
rabbitism
874c4ab260 fix: fix combobox default colors. 2023-03-22 11:01:41 +08:00
rabbitism
3fd209f180 fix: fix dropdownbutton glyph color. 2023-03-22 10:54:01 +08:00
rabbitism
7c93f635e3 fix: fix calendar date picker watermark colors. 2023-03-22 10:48:25 +08:00
rabbitism
0e3170eba2 feat: upgrade to preview6 2023-03-22 09:40:08 +08:00
Dong Bin
6376d11a25 Merge pull request #135 from irihitech/android
Android Start Mode
2023-03-21 19:30:26 +08:00
rabbitism
e48e72ec37 feat: remove theme 2023-03-21 19:25:31 +08:00
rabbitism
9f61d67141 feat: remove fluent theme. 2023-03-21 19:21:22 +08:00
rabbitism
eca7d32ba9 feat: Add EmbeddableControlRoot 2023-03-21 19:19:51 +08:00
rabbitism
2461c4a5c1 fix: temporarily add fluent back. 2023-03-20 23:52:08 +08:00
rabbitism
0657c99f31 misc: try to fix android app. 2023-03-20 23:14:50 +08:00
Zhang Dian
ba2089aed9 feat: Android start mode. 2023-03-20 19:57:51 +08:00
rabbitism
1505eacb78 misc: update docs. 2023-03-19 22:50:22 +08:00
41 changed files with 247 additions and 67 deletions

View File

@@ -11,7 +11,7 @@ Avalonia Theme inspired by Semi Design
## Installation
```bash
dotnet add package Semi.Avalonia --version 0.1.0-preview5.3
dotnet add package Semi.Avalonia --version 0.1.0-preview6
```
Include Semi Design Styles in application:
@@ -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-preview5.2
dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview5.2
dotnet add package Semi.Avalonia.ColorPicker --version 0.1.0-preview6
dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview6
```
```xaml
<Application.Styles>
@@ -42,10 +42,11 @@ https://github.com/irihitech/Semi.Avalonia/releases
## Version compatibility
| Semi Design Version | Avalonia Version|
|:--------------------|:---|
| 0.1.0-preview3 |11.0-preview4|
| 0.1.0-preview5.x |11.0-preview5|
| Semi Design Version | Avalonia Version |
|:--------------------|:-----------------|
| 0.1.0-preview3 | 11.0-preview4 |
| 0.1.0-preview5.x | 11.0-preview5 |
| 0.1.0-preview6.x | 11.0-preview6 |
## TODO
* DataValidationErrors

View File

@@ -20,9 +20,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Web", "d
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo", "demo\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj", "{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semi.Avalonia.DataGrid", "src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj", "{8A90C292-8761-4F70-8E1F-EFC097FEADB3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.DataGrid", "src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj", "{8A90C292-8761-4F70-8E1F-EFC097FEADB3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semi.Avalonia.ColorPicker", "src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj", "{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.ColorPicker", "src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj", "{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Android", "demo\Semi.Avalonia.Demo.Android\Semi.Avalonia.Demo.Android.csproj", "{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -54,6 +56,11 @@ Global
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Release|Any CPU.Build.0 = Release|Any CPU
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -62,6 +69,7 @@ Global
{2ADCA724-2B6D-46EC-87F7-604D7918B89A} = {43091528-9509-43CB-A003-9C5C11E96DD6}
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0} = {43091528-9509-43CB-A003-9C5C11E96DD6}
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0} = {43091528-9509-43CB-A003-9C5C11E96DD6}
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F} = {43091528-9509-43CB-A003-9C5C11E96DD6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7CA41ED3-2CED-40CC-AA21-28C3B42B1E86}

View File

@@ -0,0 +1,11 @@
<Application
x:Class="Semi.Avalonia.Demo.Android.App"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Semi.Avalonia.Demo.Android">
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
</Application.Styles>
</Application>

View File

@@ -0,0 +1,27 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Semi.Avalonia.Demo.Views;
namespace Semi.Avalonia.Demo.Android;
public partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is ISingleViewApplicationLifetime single)
{
single.MainView = new MainView()
{
};
}
base.OnFrameworkInitializationCompleted();
}
}

View File

@@ -0,0 +1,12 @@
using Android.App;
using Android.Content.PM;
using Avalonia.Android;
namespace Semi.Avalonia.Demo.Android;
[Activity(Label = "Semi.Avalonia.Demo.Android", Icon = "@drawable/Icon", Theme = "@style/MyTheme.NoActionBar",
LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize)]
public class MainActivity : AvaloniaMainActivity
{
}

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="Semi.Avalonia" android:icon="@drawable/Icon" />
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="@color/splash_background"/>
</item>
<item android:drawable="@drawable/Icon"
android:width="120dp"
android:height="120dp"
android:gravity="center" />
</layer-list>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="splash_background">#FFFFFF</color>
</resources>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MyTheme">
</style>
<style name="MyTheme.NoActionBar" parent="@style/Theme.AppCompat.NoActionBar">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
<style name="MyTheme.Splash" parent ="MyTheme.NoActionBar">
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowContentOverlay">@null</item>
</style>
</resources>

View File

@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0-android</TargetFramework>
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
<ApplicationId>com.irihitech.Semi.Avalonia</ApplicationId>
<ApplicationVersion>1</ApplicationVersion>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<AndroidPackageFormat>apk</AndroidPackageFormat>
<AndroidEnableProfiledAot>False</AndroidEnableProfiledAot>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<RootNamespace>Semi.Avalonia.Demo.Android</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Android" Version="11.0.0-preview6" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,22 @@
using Android.App;
using Android.Content;
using Avalonia;
using Avalonia.Android;
using Application = Android.App.Application;
namespace Semi.Avalonia.Demo.Android;
[Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)]
public class SplashActivity: AvaloniaSplashActivity<App>
{
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
return base.CustomizeAppBuilder(builder);
}
protected override void OnResume()
{
base.OnResume();
StartActivity(new Intent(Application.Context, typeof(MainActivity)));
}
}

View File

@@ -0,0 +1,11 @@
<UserControl
x:Class="Semi.Avalonia.Demo.Android.Views.MainView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
Welcome to Avalonia!
</UserControl>

View File

@@ -0,0 +1,18 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Android.Views;
public partial class MainView : UserControl
{
public MainView()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -20,9 +20,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview6" />
<!--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-preview5" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview6" />
</ItemGroup>
<ItemGroup>

View File

@@ -10,7 +10,7 @@ internal partial class Program
{
private static void Main(string[] args)
{
BuildAvaloniaApp().SetupBrowserApp("out");
BuildAvaloniaApp(); //.SetupBrowserApp("out");
}
public static AppBuilder BuildAvaloniaApp()

View File

@@ -19,8 +19,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Browser" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Browser" Version="11.0.0-preview6" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview6" />
</ItemGroup>
<ItemGroup>

View File

@@ -8,7 +8,6 @@ namespace Semi.Avalonia.Demo.Pages;
public partial class ThemeVariantDemo : UserControl
{
private ThemeVariant _variant = ThemeVariant.Default;
public ThemeVariantDemo()
{
InitializeComponent();
@@ -16,15 +15,6 @@ public partial class ThemeVariantDemo : UserControl
private void Switch_OnIsCheckedChanged(object sender, RoutedEventArgs e)
{
if (_variant == ThemeVariant.Dark)
{
scope.RequestedThemeVariant = ThemeVariant.Default;
_variant = ThemeVariant.Default;
}
else
{
scope.RequestedThemeVariant = ThemeVariant.Dark;
_variant = ThemeVariant.Dark;
}
scope.RequestedThemeVariant = scope.ActualThemeVariant == ThemeVariant.Dark ? ThemeVariant.Light : ThemeVariant.Dark;
}
}

View File

@@ -11,12 +11,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0-preview5" />
<PackageReference Include="Avalonia" Version="11.0.0-preview6" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0-preview6" />
<!--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-preview5" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview6" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
</ItemGroup>
<ItemGroup>

View File

@@ -3,10 +3,10 @@
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>10</LangVersion>
<Version>0.1.0-preview5.4</Version>
<Version>0.1.0-preview6</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-preview5</AvaloniaVersion>
<AvaloniaVersion>11.0.0-preview6</AvaloniaVersion>
</PropertyGroup>
</Project>

View File

@@ -61,7 +61,7 @@
</Panel>
</DropDownButton.Content>
<DropDownButton.Flyout>
<Flyout FlyoutPresenterClasses="nopadding" Placement="Auto">
<Flyout FlyoutPresenterClasses="nopadding" Placement="AnchorAndGravity">
<!--
The following is copy-pasted from the ColorView's control template.

View File

@@ -4,7 +4,7 @@
<PropertyGroup>
<Title>Semi.Avalonia.ColorPicker</Title>
<PackageReleaseNotes>Add Native AOT support.</PackageReleaseNotes>
<PackageReleaseNotes>Upgrade to Avalonia 11.0.0-preview6.</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>

View File

@@ -4,7 +4,7 @@
<PropertyGroup>
<Title>Semi.Avalonia.DataGrid</Title>
<PackageReleaseNotes>Add Native AOT support.</PackageReleaseNotes>
<PackageReleaseNotes>Upgrade to Avalonia 11.0.0-preview6.</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>

View File

@@ -86,9 +86,6 @@
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^ /template/ TextBlock#PART_Watermark">
<Setter Property="TextElement.Foreground" Value="{DynamicResource CalendarDatePickerTextForegroundDisabled}" />
</Style>
</Style>
</TextBox.Styles>
</TextBox>

View File

@@ -141,8 +141,8 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
ItemContainerTheme="{DynamicResource CarouselIndicatorDotListBoxItem}"
Items="{TemplateBinding Items,
Converter={StaticResource ItemsConverter}}"
ItemsSource="{TemplateBinding Items,
Converter={StaticResource ItemsConverter}}"
SelectedIndex="{Binding SelectedIndex, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>

View File

@@ -31,9 +31,7 @@
<Setter Property="Padding" Value="{DynamicResource ComboBoxSelectorDefaultPadding}" />
<Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="MaxDropDownHeight" Value="504" />
<Setter Property="Foreground" Value="{DynamicResource ComboBoxForeground}" />
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="{DynamicResource ComboBoxSelectorCornerRadius}" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
@@ -63,6 +61,7 @@
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding SelectionBoxItem,
Converter={x:Static ObjectConverters.IsNull}}"
Opacity="0.3"

View File

@@ -19,6 +19,7 @@
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DatePicker.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DateTimePickerShared.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DropdownButton.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/EmbeddableControlRoot.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/GridSplitter.axaml" />

View File

@@ -92,8 +92,7 @@
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerAcceptGlyph}"
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
</Button>
<Button
Name="PART_DismissButton"
@@ -105,8 +104,7 @@
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerDismissGlyph}"
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
Data="{DynamicResource DateTimePickerDismissGlyph}" />
</Button>
<Rectangle
Grid.ColumnSpan="2"
@@ -214,7 +212,7 @@
<Popup
Name="PART_Popup"
IsLightDismissEnabled="True"
PlacementMode="Bottom"
Placement="Bottom"
PlacementTarget="{TemplateBinding}"
WindowManagerAddShadowHint="False">
<DatePickerPresenter Name="PART_PickerPresenter" />

View File

@@ -103,8 +103,7 @@
Height="8"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="{DynamicResource DateTimePickerButtonUpGlyph}"
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
Data="{DynamicResource DateTimePickerButtonUpGlyph}" />
</Template>
</Setter>
</ControlTheme>
@@ -125,8 +124,7 @@
Height="8"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="{DynamicResource DateTimePickerButtonDownGlyph}"
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
Data="{DynamicResource DateTimePickerButtonDownGlyph}" />
</Template>
</Setter>
</ControlTheme>

View File

@@ -44,7 +44,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Center"
Data="{DynamicResource DropdownButtonIconGlyph}"
Foreground="{DynamicResource ComboBoxDropDownGlyphForeground}"
Foreground="{TemplateBinding Foreground}"
IsHitTestVisible="False"
UseLayoutRounding="False" />
</Grid>
@@ -137,7 +137,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Center"
Data="{DynamicResource DropdownButtonIconGlyph}"
Foreground="{DynamicResource ComboBoxDropDownGlyphForeground}"
Foreground="{TemplateBinding Foreground}"
IsHitTestVisible="False"
UseLayoutRounding="False" />
</Grid>

View File

@@ -0,0 +1,26 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type EmbeddableControlRoot}" TargetType="EmbeddableControlRoot">
<Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="Template">
<ControlTemplate>
<Panel>
<Border Name="PART_TransparencyFallback" IsHitTestVisible="False" />
<Border Background="{TemplateBinding Background}">
<VisualLayerManager>
<ContentPresenter
Name="PART_ContentPresenter"
Margin="{TemplateBinding Padding}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</VisualLayerManager>
</Border>
</Panel>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>

View File

@@ -6,6 +6,7 @@
<Setter Property="Focusable" Value="True" />
<Setter Property="MinWidth" Value="6" />
<Setter Property="MinHeight" Value="6" />
<Setter Property="GridSplitter.ClipToBounds" Value="False" />
<Setter Property="GridSplitter.Padding" Value="2" />
<Setter Property="Background" Value="{DynamicResource GridSplitterBackground}" />
<Setter Property="PreviewContent">

View File

@@ -81,9 +81,6 @@
</DockPanel>
</ControlTemplate>
</Setter>
<Style Selector="^ /template/ RepeatButton:pointerover &gt; PathIcon">
<Setter Property="Foreground" Value="{DynamicResource ScrollBarButtonArrowForegroundPointerOver}" />
</Style>
</ControlTheme>
<ControlTheme x:Key="{x:Type Separator}" TargetType="Separator">
@@ -179,7 +176,7 @@
IsLightDismissEnabled="False"
IsOpen="{TemplateBinding IsSubMenuOpen,
Mode=TwoWay}"
PlacementMode="Right"
Placement="RightEdgeAlignedTop"
VerticalOffset="-4"
WindowManagerAddShadowHint="False">
<Border
@@ -235,7 +232,7 @@
</Style>
<Style Selector="^:open /template/ PathIcon#PART_ExpandIcon">
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronSubMenuOpened}" />
<Setter Property="Foreground" Value="{DynamicResource MenuItemExpandIconOpenForeground}" />
</Style>
<Style Selector="^:empty /template/ PathIcon#PART_ExpandIcon">
@@ -281,6 +278,7 @@
IsOpen="{TemplateBinding IsSubMenuOpen,
Mode=TwoWay}"
OverlayInputPassThroughElement="{Binding $parent[Menu]}"
Placement="BottomEdgeAlignedLeft"
VerticalOffset="-4"
WindowManagerAddShadowHint="False">
<Border

View File

@@ -96,8 +96,7 @@
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerAcceptGlyph}"
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
</Button>
<Button
Name="PART_DismissButton"
@@ -109,8 +108,7 @@
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerDismissGlyph}"
Foreground="{Binding $parent[ContentPresenter].Foreground}" />
Data="{DynamicResource DateTimePickerDismissGlyph}" />
</Button>
<Rectangle
Grid.ColumnSpan="2"
@@ -235,7 +233,7 @@
<Popup
Name="PART_Popup"
IsLightDismissEnabled="True"
PlacementMode="Bottom"
Placement="Bottom"
PlacementTarget="{TemplateBinding}"
WindowManagerAddShadowHint="False">
<TimePickerPresenter Name="PART_PickerPresenter" />

View File

@@ -11,12 +11,10 @@
</StackPanel>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type ToggleSwitch}" TargetType="ToggleSwitch">
<Setter Property="Foreground" Value="{DynamicResource ToggleSwitchContentForeground}" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="Template">
<ControlTemplate TargetType="ToggleSwitch">
<Grid

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Data.Converters;
namespace Semi.Avalonia.Converters;
@@ -11,7 +12,7 @@ public class ItemToObjectConverter: IValueConverter
{
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is AvaloniaList<object> list)
if (value is ItemCollection list)
{
return list.Select(a => new object());
}

View File

@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Package.props"/>
<Import Project="../Package.props" />
<PropertyGroup>
<Title>Semi.Avalonia</Title>
<PackageReleaseNotes>Add new CheckBox Theme, Bug fixes. </PackageReleaseNotes>
<PackageReleaseNotes>Upgrade to Avalonia 11.0.0-preview6. </PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- -->
<SolidColorBrush x:Key="CalendarDatePickerIconForeground" Opacity="0.62" Color="#F9F9F9" />
<SolidColorBrush x:Key="CalendarDatePickerForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="CalendarDatePickerIconPointeroverForeground" Color="#F9F9F9" />
<PathGeometry x:Key="CalendarDatePickerIconGlyph">M4 20V8H20V20H4ZM2 4C2 2.89543 2.89543 2 4 2H20C21.1046 2 22 2.89543 22 4V20C22 21.1046 21.1046 22 20 22H4C2.89543 22 2 21.1046 2 20V4ZM6 10.5C6 10.2239 6.22386 10 6.5 10H8.5C8.77614 10 9 10.2239 9 10.5V12.5C9 12.7761 8.77614 13 8.5 13H6.5C6.22386 13 6 12.7761 6 12.5V10.5ZM6.5 15C6.22386 15 6 15.2239 6 15.5V17.5C6 17.7761 6.22386 18 6.5 18H8.5C8.77614 18 9 17.7761 9 17.5V15.5C9 15.2239 8.77614 15 8.5 15H6.5ZM10.5 10.5C10.5 10.2239 10.7239 10 11 10H13C13.2761 10 13.5 10.2239 13.5 10.5V12.5C13.5 12.7761 13.2761 13 13 13H11C10.7239 13 10.5 12.7761 10.5 12.5V10.5ZM11 15C10.7239 15 10.5 15.2239 10.5 15.5V17.5C10.5 17.7761 10.7239 18 11 18H13C13.2761 18 13.5 17.7761 13.5 17.5V15.5C13.5 15.2239 13.2761 15 13 15H11ZM15 10.5C15 10.2239 15.2239 10 15.5 10H17.5C17.7761 10 18 10.2239 18 10.5V12.5C18 12.7761 17.7761 13 17.5 13H15.5C15.2239 13 15 12.7761 15 12.5V10.5ZM15.5 15C15.2239 15 15 15.2239 15 15.5V17.5C15 17.7761 15.2239 18 15.5 18H17.5C17.7761 18 18 17.7761 18 17.5V15.5C18 15.2239 17.7761 15 17.5 15H15.5Z</PathGeometry>
<SolidColorBrush x:Key="CalendarDatePickerBackground" Opacity="0.12" Color="White" />

View File

@@ -37,6 +37,7 @@
<SolidColorBrush x:Key="MenuItemInputGestureTextForeground" Color="Gray" />
<SolidColorBrush x:Key="MenuItemExpandIconForeground" Opacity="0.62" Color="#F9F9F9" />
<SolidColorBrush x:Key="MenuItemExpandIconOpenForeground" Color="#F9F9F9" />
<Thickness x:Key="MenuItemExpandIconMargin">4 0</Thickness>
<SolidColorBrush x:Key="MenuItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" />

View File

@@ -1,6 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- -->
<SolidColorBrush x:Key="CalendarDatePickerIconForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="CalendarDatePickerForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="CalendarDatePickerIconPointeroverForeground" Color="#1C1F23" />
<PathGeometry x:Key="CalendarDatePickerIconGlyph">M4 20V8H20V20H4ZM2 4C2 2.89543 2.89543 2 4 2H20C21.1046 2 22 2.89543 22 4V20C22 21.1046 21.1046 22 20 22H4C2.89543 22 2 21.1046 2 20V4ZM6 10.5C6 10.2239 6.22386 10 6.5 10H8.5C8.77614 10 9 10.2239 9 10.5V12.5C9 12.7761 8.77614 13 8.5 13H6.5C6.22386 13 6 12.7761 6 12.5V10.5ZM6.5 15C6.22386 15 6 15.2239 6 15.5V17.5C6 17.7761 6.22386 18 6.5 18H8.5C8.77614 18 9 17.7761 9 17.5V15.5C9 15.2239 8.77614 15 8.5 15H6.5ZM10.5 10.5C10.5 10.2239 10.7239 10 11 10H13C13.2761 10 13.5 10.2239 13.5 10.5V12.5C13.5 12.7761 13.2761 13 13 13H11C10.7239 13 10.5 12.7761 10.5 12.5V10.5ZM11 15C10.7239 15 10.5 15.2239 10.5 15.5V17.5C10.5 17.7761 10.7239 18 11 18H13C13.2761 18 13.5 17.7761 13.5 17.5V15.5C13.5 15.2239 13.2761 15 13 15H11ZM15 10.5C15 10.2239 15.2239 10 15.5 10H17.5C17.7761 10 18 10.2239 18 10.5V12.5C18 12.7761 17.7761 13 17.5 13H15.5C15.2239 13 15 12.7761 15 12.5V10.5ZM15.5 15C15.2239 15 15 15.2239 15 15.5V17.5C15 17.7761 15.2239 18 15.5 18H17.5C17.7761 18 18 17.7761 18 17.5V15.5C18 15.2239 17.7761 15 17.5 15H15.5Z</PathGeometry>
<SolidColorBrush x:Key="CalendarDatePickerBackground" Opacity="0.05" Color="#FF2E3238" />

View File

@@ -37,6 +37,7 @@
<SolidColorBrush x:Key="MenuItemInputGestureTextForeground" Color="Gray" />
<SolidColorBrush x:Key="MenuItemExpandIconForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="MenuItemExpandIconOpenForeground" Color="#1C1F23" />
<Thickness x:Key="MenuItemExpandIconMargin">4 0</Thickness>
<SolidColorBrush x:Key="MenuItemDisabledForeground" Opacity="0.35" Color="#1C1F23" />