浏览代码

LibGfx: Don't paint the window frame larger for the border-radius

Previously with a border radius you would get a "ghost" window frame
which was not really there, and would not respond to clicks/attempts
to resize.
MacDue 3 年之前
父节点
当前提交
6c48fd84ad
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      Userland/Libraries/LibGfx/ClassicStylePainter.cpp

+ 1 - 5
Userland/Libraries/LibGfx/ClassicStylePainter.cpp

@@ -302,11 +302,7 @@ 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.x() - border_radius / 2,
-                                                   rect.y() - border_radius / 2,
-                                                   rect.width() + border_radius,
-                                                   rect.height() + border_radius },
-            base_color, border_radius);
+        painter.fill_rect_with_rounded_corners(rect, base_color, border_radius);
         return;
     }