Fix window decorations being too wide #309

Merged
Daninator1 merged 1 commits from system-decorations-min-width-fix into master 2024-11-24 15:49:44 +00:00
Daninator1 commented 2024-11-24 15:29:50 +00:00 (Migrated from github.com)

This PR fixes the window decorations being too wide after the switch to AppWindow.

After some investigating I found out that the MinWidth button style that was applied globally affected the custom implementation of the window decorations created by the FluentAvalonia library.

I therefore excluded these buttons from the style which fixes the issue while not affecting other parts of the UI where this MinWidth style may have been intended.

As a bonus, this also seems to fix the missing window tiling selector (or whatever it is called) on Windows 11 which should appear when hovering over the minimize/maximize button. For me, this was (almost always) broken until I applied this fix.

As I'm no expert regarding Avalonia, please feel free to let me know if you see any issues with this approach! 👍🏻
Additionally, I could only test this change on a Windows (11) machine, so if anyone else could confirm that this does not break the window decorations on macOS or Linux, that would be great!

Fixes #19

This PR fixes the window decorations being too wide after the switch to AppWindow. After some investigating I found out that the MinWidth button style that was applied globally affected the custom implementation of the window decorations created by the FluentAvalonia library. I therefore excluded these buttons from the style which fixes the issue while not affecting other parts of the UI where this MinWidth style may have been intended. As a bonus, this also seems to fix the missing window tiling selector (or whatever it is called) on Windows 11 which should appear when hovering over the minimize/maximize button. For me, this was (almost always) broken until I applied this fix. As I'm no expert regarding Avalonia, please feel free to let me know if you see any issues with this approach! 👍🏻 Additionally, I could only test this change on a Windows (11) machine, so if anyone else could confirm that this does not break the window decorations on macOS or Linux, that would be great! Fixes #19
github-actions[bot] commented 2024-11-24 15:39:13 +00:00 (Migrated from github.com)
Download the artifacts for this pull request: * [ryujinx-Release-1.2.0+f27db00-linux_arm64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229830981.zip) * [ryujinx-Release-1.2.0+f27db00-linux_arm64-AppImage](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229831037.zip) * [ryujinx-Release-1.2.0+f27db00-linux_x64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229831761.zip) * [ryujinx-Release-1.2.0+f27db00-linux_x64-AppImage](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229831801.zip) * [ryujinx-Release-1.2.0+f27db00-macos_universal](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229833599.zip) * [ryujinx-Release-1.2.0+f27db00-win_x64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229835843.zip) <details><summary>GUI-less</summary> * [nogui-ryujinx-Release-1.2.0+f27db00-linux_arm64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229831111.zip) * [nogui-ryujinx-Release-1.2.0+f27db00-linux_x64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229831864.zip) * [nogui-ryujinx-Release-1.2.0+f27db00-macos_universal](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229833644.zip) * [nogui-ryujinx-Release-1.2.0+f27db00-win_x64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229835917.zip) </details> <details><summary>Only for Developers</summary> * [ryujinx-Debug-1.2.0+f27db00-linux_arm64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229829515.zip) * [ryujinx-Debug-1.2.0+f27db00-linux_arm64-AppImage](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229829558.zip) * [nogui-ryujinx-Debug-1.2.0+f27db00-linux_arm64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229829608.zip) * [ryujinx-Debug-1.2.0+f27db00-linux_x64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229832903.zip) * [ryujinx-Debug-1.2.0+f27db00-linux_x64-AppImage](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229832940.zip) * [nogui-ryujinx-Debug-1.2.0+f27db00-linux_x64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229833010.zip) * [ryujinx-Debug-1.2.0+f27db00-macos_universal](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229834195.zip) * [nogui-ryujinx-Debug-1.2.0+f27db00-macos_universal](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229834247.zip) * [ryujinx-Debug-1.2.0+f27db00-win_x64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229836988.zip) * [nogui-ryujinx-Debug-1.2.0+f27db00-win_x64](https://nightly.link/GreemDev/Ryujinx/actions/artifacts/2229837068.zip) </details>
Fusionalex commented 2024-11-24 15:47:08 +00:00 (Migrated from github.com)

Seems to work fine on macOS!

Seems to work fine on macOS!
GreemDev commented 2024-11-24 15:49:37 +00:00 (Migrated from github.com)

Thanks for your contribution!

Thanks for your contribution!
Sign in to join this conversation.
No description provided.