From f0cac83243037900f7981087fd91408c2f75bb79 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 23 Apr 2020 14:37:13 +0200 Subject: [PATCH] WindowServer+LibGfx: Make window borders 1px thicker --- Libraries/LibGfx/StylePainter.cpp | 4 ++++ Servers/WindowServer/WindowFrame.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Libraries/LibGfx/StylePainter.cpp b/Libraries/LibGfx/StylePainter.cpp index 6d086fd325..f8de190a19 100644 --- a/Libraries/LibGfx/StylePainter.cpp +++ b/Libraries/LibGfx/StylePainter.cpp @@ -248,13 +248,17 @@ void StylePainter::paint_window_frame(Painter& painter, const Rect& rect, const painter.draw_line(rect.top_left().translated(1, 1), rect.bottom_left().translated(1, -1), light_shade); painter.draw_line(rect.top_left().translated(2, 2), rect.top_right().translated(-2, 2), base_color); painter.draw_line(rect.top_left().translated(2, 2), rect.bottom_left().translated(2, -2), base_color); + painter.draw_line(rect.top_left().translated(3, 3), rect.top_right().translated(-3, 3), base_color); + painter.draw_line(rect.top_left().translated(3, 3), rect.bottom_left().translated(3, -3), base_color); painter.draw_line(rect.top_right(), rect.bottom_right(), dark_shade); painter.draw_line(rect.top_right().translated(-1, 1), rect.bottom_right().translated(-1, -1), mid_shade); painter.draw_line(rect.top_right().translated(-2, 2), rect.bottom_right().translated(-2, -2), base_color); + painter.draw_line(rect.top_right().translated(-3, 3), rect.bottom_right().translated(-3, -3), base_color); painter.draw_line(rect.bottom_left(), rect.bottom_right(), dark_shade); painter.draw_line(rect.bottom_left().translated(1, -1), rect.bottom_right().translated(-1, -1), mid_shade); painter.draw_line(rect.bottom_left().translated(2, -2), rect.bottom_right().translated(-2, -2), base_color); + painter.draw_line(rect.bottom_left().translated(3, -3), rect.bottom_right().translated(-3, -3), base_color); } void StylePainter::paint_progress_bar(Painter& painter, const Rect& rect, const Palette& palette, int min, int max, int value, const StringView& text) diff --git a/Servers/WindowServer/WindowFrame.cpp b/Servers/WindowServer/WindowFrame.cpp index cb33949af5..03fa54e001 100644 --- a/Servers/WindowServer/WindowFrame.cpp +++ b/Servers/WindowServer/WindowFrame.cpp @@ -154,7 +154,7 @@ Gfx::Rect WindowFrame::title_bar_rect() const { if (m_window.type() == WindowType::Notification) return { m_window.width() + 3, 3, window_titlebar_height, m_window.height() }; - return { 3, 3, m_window.width(), window_titlebar_height }; + return { 4, 4, m_window.width(), window_titlebar_height }; } Gfx::Rect WindowFrame::title_bar_icon_rect() const @@ -282,10 +282,10 @@ static Gfx::Rect frame_rect_for_window(Window& window, const Gfx::Rect& rect) switch (type) { case WindowType::Normal: return { - rect.x() - 3, - rect.y() - window_titlebar_height - 4 + offset, - rect.width() + 6, - rect.height() + 7 + window_titlebar_height - offset + rect.x() - 4, + rect.y() - window_titlebar_height - 5 + offset, + rect.width() + 8, + rect.height() + 8 + window_titlebar_height - offset }; case WindowType::Notification: return {