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

LibGUI: Don't paint borders for invisible bars in ToolBarContainer

This commit is contained in:
Andreas Kling 2020-10-03 19:43:25 +02:00
parent 9f00afd8cd
commit 3b2120e7b6

View file

@ -111,6 +111,8 @@ void ToolBarContainer::paint_event(GUI::PaintEvent& event)
painter.add_clip_rect(event.rect());
for (auto& toolbar : m_toolbars) {
if (!toolbar.is_visible())
continue;
auto rect = toolbar.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());