GToolBar: Make the framed appearance optional.

This commit is contained in:
Andreas Kling 2019-05-10 22:58:52 +02:00
parent d8ae6c31ce
commit db5341e11d
Notes: sideshowbarker 2024-07-19 14:10:43 +09:00
2 changed files with 9 additions and 1 deletions

View file

@ -81,5 +81,9 @@ void GToolBar::paint_event(GPaintEvent& event)
{
GPainter painter(*this);
painter.add_clip_rect(event.rect());
StylePainter::paint_surface(painter, rect(), x() != 0, y() != 0);
if (m_has_frame)
StylePainter::paint_surface(painter, rect(), x() != 0, y() != 0);
else
painter.fill_rect(event.rect(), Color::LightGray);
}