From 72f425391114556973f356885dc9d4a6aeff8787 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 21 Oct 2024 14:33:30 +0200 Subject: [PATCH] LibWeb: Scale up "inspected node" hint text to match screen DPI This fixes an issue where the text would look very small on macOS. --- Userland/Libraries/LibWeb/Painting/PaintableBox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index 666f7b68da1..4c336566b09 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -432,7 +432,7 @@ void PaintableBox::paint(PaintContext& context, PaintPhase phase) const auto size_text_device_rect = context.enclosing_device_rect(size_text_rect).to_type(); context.display_list_recorder().fill_rect(size_text_device_rect, context.palette().color(Gfx::ColorRole::Tooltip)); context.display_list_recorder().draw_rect(size_text_device_rect, context.palette().threed_shadow1()); - context.display_list_recorder().draw_text(size_text_device_rect, size_text, font, Gfx::TextAlignment::Center, context.palette().color(Gfx::ColorRole::TooltipText)); + context.display_list_recorder().draw_text(size_text_device_rect, size_text, font.with_size(font.point_size() * context.device_pixels_per_css_pixel()), Gfx::TextAlignment::Center, context.palette().color(Gfx::ColorRole::TooltipText)); } }