WindowServer+LibGfx: Make window borders 1px thicker

This commit is contained in:
Andreas Kling 2020-04-23 14:37:13 +02:00
parent 9ab9f97464
commit f0cac83243
Notes: sideshowbarker 2024-07-19 07:22:35 +09:00
2 changed files with 9 additions and 5 deletions

View file

@ -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)

View file

@ -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 {