mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
GGroupBox: Improve appearance with new FrameShape::Box style.
This commit is contained in:
parent
f0501a0102
commit
93b76628a5
5 changed files with 25 additions and 5 deletions
|
@ -153,4 +153,13 @@ void StylePainter::paint_frame(Painter& painter, const Rect& rect, FrameShape sh
|
|||
painter.draw_line(inner_container_frame_rect.top_left().translated(0, 1), inner_container_frame_rect.bottom_left().translated(0, -1), top_left_color);
|
||||
painter.draw_line(inner_container_frame_rect.top_right(), inner_container_frame_rect.bottom_right().translated(0, -1), bottom_right_color);
|
||||
}
|
||||
|
||||
if (shape == FrameShape::Box && thickness >= 2) {
|
||||
swap(top_left_color, bottom_right_color);
|
||||
Rect inner_rect = rect.shrunken(2, 2);
|
||||
painter.draw_line(inner_rect.top_left(), inner_rect.top_right(), top_left_color);
|
||||
painter.draw_line(inner_rect.bottom_left(), inner_rect.bottom_right(), bottom_right_color);
|
||||
painter.draw_line(inner_rect.top_left().translated(0, 1), inner_rect.bottom_left().translated(0, -1), top_left_color);
|
||||
painter.draw_line(inner_rect.top_right(), inner_rect.bottom_right().translated(0, -1), bottom_right_color);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue