mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:28:11 +00:00
LibGUI: Add GUI_HOVER_DEBUG runtime debugging flag (environment)
You can now see the outline of GUI widgets when hovering them. For example: $ export GUI_HOVER_DEBUG=1 $ FileManager Then move the mouse around in the file manager. :^)
This commit is contained in:
parent
3d4f93cf8d
commit
b3d27c2340
5 changed files with 16 additions and 0 deletions
|
@ -356,6 +356,11 @@ void Widget::handle_paint_event(PaintEvent& event)
|
|||
painter.draw_rect(rect(), Color::Cyan);
|
||||
}
|
||||
|
||||
if (app && app->hover_debugging_enabled() && this == window()->hovered_widget()) {
|
||||
Painter painter(*this);
|
||||
painter.draw_rect(rect(), Color::Red);
|
||||
}
|
||||
|
||||
if (is_being_inspected()) {
|
||||
Painter painter(*this);
|
||||
painter.draw_rect(rect(), Color::Magenta);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue