irihitech / Ursa.Avalonia

Ursa is a UI library for building cross-platform UIs with Avalonia UI.
https://irihitech.github.io/Ursa.Avalonia/
MIT License
668 stars 65 forks source link

Proposal: Notification is overlapped by TitleBar on the right top corner #472

Open akoshko opened 1 week ago

akoshko commented 1 week ago

Hi there! I just noticed that notification is slightly overlapped by TitleBar on Windows and Linux when it's position is set to TopRight. Here is an example from the Demo application: image

Here is how it can be adjusted for these two specific platforms:

 <Style Selector="^:topright /template/ ReversibleStackPanel#PART_Items">
            <Setter Property="VerticalAlignment" Value="Top" />
            <Setter Property="HorizontalAlignment" Value="Right" />

            <OnPlatform>
                <On Options="Windows, Linux">
                    <Setter Property="Margin" Value="0 36 0 0 " />
                </On>
            </OnPlatform>

        </Style>

image

Is it relevant? I can prepare a PR if this margin on the top corner is not intentionally left as it is, ping me there please if you don't mind.

rabbitism commented 1 week ago

iirc the same thing happens to toast. It kinda complicated because it only overlaps when host window extends client area, but we cannot always assume user enabled this.