[FEAT]: Border anti-aliasing #385

Closed
opened 2026-01-05 14:50:14 +01:00 by adam · 6 comments
Owner

Originally created by @Insprill on GitHub (May 21, 2024).

Is your feature request related to a problem? Please describe.
Borders have quite a bit of visible aliasing on the rounded window corners of Windows 11.

Describe the solution you'd like
Implementing anti-aliasing for these borders would make them look significantly better.

Additional context
PowerToys did this with always-on-top borders in their latest update. I'm not sure how related, if at all, their border code is to Komorebi's, but maybe it helps :)
5d5e56ef55

Originally created by @Insprill on GitHub (May 21, 2024). **Is your feature request related to a problem? Please describe.** Borders have quite a bit of visible aliasing on the rounded window corners of Windows 11. **Describe the solution you'd like** Implementing anti-aliasing for these borders would make them look significantly better. **Additional context** PowerToys did this with always-on-top borders in their latest update. I'm not sure how related, if at all, their border code is to Komorebi's, but maybe it helps :) https://github.com/microsoft/PowerToys/commit/5d5e56ef554cc8b2aa8590b40a98e54c81659746
adam added the enhancement label 2026-01-05 14:50:14 +01:00
adam closed this issue 2026-01-05 14:50:14 +01:00
Author
Owner

@LGUG2Z commented on GitHub (May 21, 2024):

I honestly don't see anything 😅 But I have a friend who is very serious about aliasing and hinting and all those things, so I know if you see it you can't stop seeing it.

I'll leave this open for someone else, I honestly wouldn't even have any idea where to start since it looks like they are drawing borders in a completely different way using Direct2D directly.

@LGUG2Z commented on GitHub (May 21, 2024): I honestly don't see anything 😅 But I have a friend who is very serious about aliasing and hinting and all those things, so I know if you see it you can't stop seeing it. I'll leave this open for someone else, I honestly wouldn't even have any idea where to start since it looks like they are drawing borders in a completely different way using Direct2D directly.
Author
Owner

@pchomik commented on GitHub (Oct 31, 2024):

I see this problem on my pc.

I don't know Rust but I found that you are using windows::Win32::Graphics::Gdi::RoundRect. Maybe it is enough to enable antialiasing in general. I found those sources about that:

Could you look and check if that may help?

Site Note: I found that some fonts have antialiasing issue as well.

@pchomik commented on GitHub (Oct 31, 2024): I see this problem on my pc. I don't know Rust but I found that you are using `windows::Win32::Graphics::Gdi::RoundRect`. Maybe it is enough to enable antialiasing in general. I found those sources about that: * https://learn.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-antialiasing-with-lines-and-curves-about * https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Graphics/GdiPlus/fn.GdipSetSmoothingMode.html Could you look and check if that may help? Site Note: I found that some fonts have antialiasing issue as well.
Author
Owner

@LGUG2Z commented on GitHub (Nov 3, 2024):

image

Some good progress has been made on anti-aliasing which testers can try on the feature/tacky-borders branch.

@LGUG2Z commented on GitHub (Nov 3, 2024): ![image](https://github.com/user-attachments/assets/9c75ed06-2b11-4082-8c0b-228bcf28c2ba) Some good progress has been made on anti-aliasing which testers can try on the `feature/tacky-borders` branch.
Author
Owner

@pchomik commented on GitHub (Nov 11, 2024):

@LGUG2Z could you create binaries from mentioned branch?

@pchomik commented on GitHub (Nov 11, 2024): @LGUG2Z could you create binaries from mentioned branch?
Author
Owner

@LGUG2Z commented on GitHub (Nov 11, 2024):

The binaries are built and uploaded automatically by GitHub Actions: click the green tick next to a commit and it should take you to the Actions run where the commit was built and the binaries were uploaded.

@LGUG2Z commented on GitHub (Nov 11, 2024): The binaries are built and uploaded automatically by GitHub Actions: click the green tick next to a commit and it should take you to the Actions run where the commit was built and the binaries were uploaded.
Author
Owner

@pchomik commented on GitHub (Nov 12, 2024):

I did few tests and looks like border around window looks better. Is it possible to the same for rounded stack?
On my screen stackback looks as follow:

image

@pchomik commented on GitHub (Nov 12, 2024): I did few tests and looks like border around window looks better. Is it possible to the same for rounded stack? On my screen stackback looks as follow: ![image](https://github.com/user-attachments/assets/a2a97cd1-42f7-4751-918e-700c993f1f4d)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#385