2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-03 09:03:42 -04:00

feat: cosmetic overhaul of native notification popup (#13)

* feat: cosmetic overhaul of native notification popup

* fix: use correct screen default

* feat: move notification test from debug build type to button press

* fix: not debug anymore

* fix: rearrange native notification settings controls

* fix: account for display scaling when positioning notification

* fix: guard against a screen that no longer exists

* fix: safer way to get screens, in case control tree changes
This commit is contained in:
Xjph
2021-08-29 20:27:20 -02:30
committed by GitHub
parent 4cebc3a344
commit 7d2cc417ba
10 changed files with 401 additions and 35 deletions

View File

@ -5,25 +5,40 @@
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="150"
x:Class="Observatory.UI.Views.NotificationView"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="-1"
Title="Notification"
Width="400" Height="150"
Topmost="True">
<StackPanel DataContext="{Binding Notification}">
<TextBlock
Padding="10"
FontWeight="Bold"
FontSize="30"
FontFamily="Ebrima"
Text="{Binding Title}">
Title
</TextBlock>
<TextBlock
Padding="20,0"
FontWeight="Normal"
FontSize="20"
FontFamily="Ebrima"
Text="{Binding Detail}">
Detail
</TextBlock>
</StackPanel>
MinWidth="400" MinHeight="150"
MaxWidth="400" MaxHeight="150"
Topmost="True"
SizeToContent="Height"
TransparencyLevelHint="AcrylicBlur"
Background="Transparent"
Focusable="False">
<Panel DataContext="{Binding Notification}">
<Border BorderBrush="{Binding Colour}" BorderThickness="4">
<StackPanel Width="400">
<TextBlock
Name="Title"
Padding="10"
FontWeight="Normal"
FontSize="30"
Foreground="{Binding Colour}"
Text="{Binding Title}">
Title
</TextBlock>
<TextBlock
Name="Detail"
Padding="20,0"
FontWeight="Normal"
FontSize="20"
TextWrapping="Wrap"
Foreground="{Binding Colour}"
Text="{Binding Detail}">
Detail
</TextBlock>
</StackPanel>
</Border>
</Panel>
</Window>