mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibHTML+Browser: Add debug option to draw borders around line boxes
This will be very useful when debugging line layout.
This commit is contained in:
parent
14f0a5943b
commit
2530378f59
5 changed files with 20 additions and 0 deletions
|
@ -102,6 +102,15 @@ int main(int argc, char** argv)
|
|||
debug_menu->add_action(GAction::create("Dump Layout tree", [&](auto&) {
|
||||
dump_tree(*html_widget->document()->layout_node());
|
||||
}));
|
||||
debug_menu->add_separator();
|
||||
auto line_box_borders_action = GAction::create("Line box borders", [&](auto& action) {
|
||||
action.set_checked(!action.is_checked());
|
||||
html_widget->set_should_show_line_box_borders(action.is_checked());
|
||||
html_widget->update();
|
||||
});
|
||||
line_box_borders_action->set_checkable(true);
|
||||
line_box_borders_action->set_checked(false);
|
||||
debug_menu->add_action(line_box_borders_action);
|
||||
menubar->add_menu(move(debug_menu));
|
||||
|
||||
auto help_menu = make<GMenu>("Help");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue