From 7628f1f233874bfce6825b268d8bea3f066b35e9 Mon Sep 17 00:00:00 2001 From: MacDue Date: Thu, 10 Mar 2022 02:22:01 +0000 Subject: [PATCH] LibGfx: Draw window frame border radii antialiased I think this now looks very nice :^) --- Userland/Libraries/LibGfx/ClassicStylePainter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/ClassicStylePainter.cpp b/Userland/Libraries/LibGfx/ClassicStylePainter.cpp index c9c178388b..4695b1e40c 100644 --- a/Userland/Libraries/LibGfx/ClassicStylePainter.cpp +++ b/Userland/Libraries/LibGfx/ClassicStylePainter.cpp @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -303,7 +304,8 @@ void ClassicStylePainter::paint_window_frame(Painter& painter, IntRect const& re // FIXME: This will draw "useless" pixels that'll get drawn over by the window contents. // preferrably we should just remove the corner pixels from the completely drawn window // but I don't know how to do that yet. :^) - painter.fill_rect_with_rounded_corners(rect, base_color, border_radius); + AntiAliasingPainter aa_painter { painter }; + aa_painter.fill_rect_with_rounded_corners(rect, base_color, border_radius); return; }