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

LibGUI: Paint all widgets as toolbars in ToolBarContainer

Fixes missing shadow and highlight threeds for Bookmark bar
This commit is contained in:
thankyouverycool 2021-02-25 12:56:47 -05:00 committed by Andreas Kling
parent 6cdb657493
commit 0c4fbcae76

View file

@ -55,9 +55,9 @@ void ToolBarContainer::paint_event(GUI::PaintEvent& event)
Painter painter(*this);
painter.add_clip_rect(event.rect());
for_each_child_of_type<ToolBar>([&](auto& toolbar) {
if (toolbar.is_visible()) {
auto rect = toolbar.relative_rect();
for_each_child_widget([&](auto& widget) {
if (widget.is_visible()) {
auto rect = widget.relative_rect();
painter.draw_line(rect.top_left().translated(0, -1), rect.top_right().translated(0, -1), palette().threed_highlight());
painter.draw_line(rect.bottom_left().translated(0, 1), rect.bottom_right().translated(0, 1), palette().threed_shadow1());
}