Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix window decorations being too wide #309

Merged

Conversation

Daninator1
Copy link
Contributor

@Daninator1 Daninator1 commented Nov 24, 2024

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 github-actions bot added the gui Affects the Avalonia UI or translations. label Nov 24, 2024
@Daninator1 Daninator1 changed the title Fix system decorations being too wide Fix window decorations being too wide Nov 24, 2024
@Fusionalex
Copy link

Seems to work fine on macOS!

@GreemDev
Copy link
Owner

Thanks for your contribution!

@GreemDev GreemDev merged commit a81212b into GreemDev:master Nov 24, 2024
11 checks passed
@Daninator1 Daninator1 deleted the system-decorations-min-width-fix branch November 24, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui Affects the Avalonia UI or translations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close, minimize and maximize buttons are too big on windows
3 participants