1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:08:10 +00:00

LibGUI: Improve GStatusBar and GToolBar and share some code via GStyle.

This commit is contained in:
Andreas Kling 2019-03-04 10:47:54 +01:00
parent ac2a3f7fdf
commit 4ea7a51ecd
4 changed files with 18 additions and 11 deletions

View file

@ -51,3 +51,12 @@ void GStyle::paint_button(Painter& painter, const Rect& rect, GButtonStyle butto
painter.translate(-rect.location().x(), -rect.location().y());
}
void GStyle::paint_surface(Painter& painter, const Rect& rect)
{
painter.fill_rect({ rect.x(), rect.y() + 1, rect.width(), rect.height() - 2 }, Color::LightGray);
painter.draw_line(rect.top_left(), rect.top_right(), Color::White);
painter.draw_line(rect.bottom_left(), rect.bottom_right(), Color::DarkGray);
painter.draw_line(rect.top_left().translated(0, 1), rect.bottom_left().translated(0, -1), Color::White);
painter.draw_line(rect.top_right(), rect.bottom_right().translated(0, -1), Color::DarkGray);
}