feat: add default Theme to SplashWindow.
This commit is contained in:
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