From b20137e8aacf861fd1bf628635fafac7c164b0b3 Mon Sep 17 00:00:00 2001
From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
Date: Mon, 24 Feb 2025 15:44:37 +0800
Subject: [PATCH] feat: add default Theme to SplashWindow.
---
demo/Ursa.Demo/Views/MainSplashWindow.axaml | 15 ++---------
.../Controls/SplashWindow.axaml | 27 +++++++++++++++++++
src/Ursa.Themes.Semi/Controls/_index.axaml | 1 +
src/Ursa/Windows/SplashWindow.cs | 2 ++
4 files changed, 32 insertions(+), 13 deletions(-)
create mode 100644 src/Ursa.Themes.Semi/Controls/SplashWindow.axaml
diff --git a/demo/Ursa.Demo/Views/MainSplashWindow.axaml b/demo/Ursa.Demo/Views/MainSplashWindow.axaml
index b4942ed..6bb95af 100644
--- a/demo/Ursa.Demo/Views/MainSplashWindow.axaml
+++ b/demo/Ursa.Demo/Views/MainSplashWindow.axaml
@@ -2,22 +2,11 @@
x:Class="Ursa.Demo.Views.MainSplashWindow"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:iri="https://irihi.tech/shared"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="https://irihi.tech/ursa"
Title="MainSplashWindow"
Width="400"
- Height="400"
- d:DesignHeight="450"
- d:DesignWidth="800"
- CountDown="0:0:3"
- ExtendClientAreaChromeHints="NoChrome"
- ExtendClientAreaTitleBarHeightHint="0"
- ExtendClientAreaToDecorationsHint="True"
- SystemDecorations="None"
- WindowStartupLocation="CenterScreen"
- mc:Ignorable="d">
+ Height="400">
-
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Controls/SplashWindow.axaml b/src/Ursa.Themes.Semi/Controls/SplashWindow.axaml
new file mode 100644
index 0000000..6c03cb8
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Controls/SplashWindow.axaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Full
+
+
+ None
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Controls/_index.axaml b/src/Ursa.Themes.Semi/Controls/_index.axaml
index 541005b..ce51210 100644
--- a/src/Ursa.Themes.Semi/Controls/_index.axaml
+++ b/src/Ursa.Themes.Semi/Controls/_index.axaml
@@ -56,5 +56,6 @@
+
diff --git a/src/Ursa/Windows/SplashWindow.cs b/src/Ursa/Windows/SplashWindow.cs
index c63196a..064d906 100644
--- a/src/Ursa/Windows/SplashWindow.cs
+++ b/src/Ursa/Windows/SplashWindow.cs
@@ -8,6 +8,8 @@ namespace Ursa.Controls;
public abstract class SplashWindow: Window
{
+ protected override Type StyleKeyOverride => typeof(SplashWindow);
+
public static readonly StyledProperty CountDownProperty = AvaloniaProperty.Register(
nameof(CountDown));