LibGUI: Add a GToolBar class that can be populated with GActions.

The same action can be added to both a menu and a toolbar.
Use this to put a toolbar into FileManager. This is pretty neat. :^)
This commit is contained in:
Andreas Kling 2019-02-20 02:39:46 +01:00
commit b704d3d295
Notes: sideshowbarker 2024-07-19 15:40:07 +09:00
24 changed files with 196 additions and 44 deletions

View file

@ -73,6 +73,13 @@ void GWidget::handle_paint_event(GPaintEvent& event)
if (fill_with_background_color()) {
Painter painter(*this);
painter.fill_rect(event.rect(), background_color());
} else {
#ifdef DEBUG_WIDGET_UNDERDRAW
// FIXME: This is a bit broken.
// If the widget is not opaque, let's not mess it up with debugging color.
Painter painter(*this);
painter.fill_rect(rect(), Color::Red);
#endif
}
paint_event(event);
for (auto* ch : children()) {