ladybird/Libraries/LibWeb/Painting/GridInspectorOverlay.h
Sam Atkins 28e1e1b160 LibWeb/Painting: Implement painting a debug overlay for grids
Paint grid overlays with the same visual context as the normal inspector
overlay, so scroll frames and transforms affect highlighted grids the
same way they affect page content.

Also support optional line numbers, named areas, infinite lines, and
track size labels.

We introduce a paint_with_inspector_overlay_context() helper to share
the significant amount of code to paint overlays with the correct
context.
2026-05-27 17:47:50 +01:00

21 lines
396 B
C++

/*
* Copyright (c) 2026, Ladybird contributors
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGfx/Color.h>
namespace Web::Painting {
struct GridInspectorOverlayOptions {
Gfx::Color color { 76, 179, 212 };
bool show_area_names { true };
bool show_line_numbers { true };
bool show_track_sizes { false };
bool show_infinite_lines { false };
};
}