feat: add default Theme to SplashWindow.
This commit is contained in:
@@ -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">
|
||||
<Grid
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
@@ -51,4 +40,4 @@
|
||||
Text="Aesthetic Evolution of Productivity" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</u:SplashWindow>
|
||||
</u:SplashWindow>
|
||||
27
src/Ursa.Themes.Semi/Controls/SplashWindow.axaml
Normal file
27
src/Ursa.Themes.Semi/Controls/SplashWindow.axaml
Normal file
@@ -0,0 +1,27 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:u="https://irihi.tech/ursa">
|
||||
<ControlTheme x:Key="{x:Type u:SplashWindow}" TargetType="u:SplashWindow">
|
||||
<Setter Property="CountDown" Value="0:0:3" />
|
||||
<Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" />
|
||||
<Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource WindowDefaultBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
|
||||
<Setter Property="ExtendClientAreaChromeHints" Value="NoChrome" />
|
||||
<Setter Property="ExtendClientAreaTitleBarHeightHint" Value="0" />
|
||||
<Setter Property="ExtendClientAreaToDecorationsHint" Value="True" />
|
||||
<Setter Property="WindowStartupLocation" Value="CenterScreen" />
|
||||
<Setter Property="SystemDecorations">
|
||||
<OnPlatform>
|
||||
<On Options="Default, Windows, macOS">
|
||||
<SystemDecorations>Full</SystemDecorations>
|
||||
</On>
|
||||
<On Options="Linux">
|
||||
<SystemDecorations>None</SystemDecorations>
|
||||
</On>
|
||||
</OnPlatform>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -56,5 +56,6 @@
|
||||
<ResourceInclude Source="UrsaWindow.axaml"/>
|
||||
<ResourceInclude Source="PinCode.axaml" />
|
||||
<ResourceInclude Source="PathPicker.axaml"/>
|
||||
<ResourceInclude Source="SplashWindow.axaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -8,6 +8,8 @@ namespace Ursa.Controls;
|
||||
|
||||
public abstract class SplashWindow: Window
|
||||
{
|
||||
protected override Type StyleKeyOverride => typeof(SplashWindow);
|
||||
|
||||
public static readonly StyledProperty<TimeSpan?> CountDownProperty = AvaloniaProperty.Register<SplashWindow, TimeSpan?>(
|
||||
nameof(CountDown));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user