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.
21 lines
396 B
C++
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 };
|
|
};
|
|
|
|
}
|