Explorar el Código

LibWeb: Scale up "inspected node" hint text to match screen DPI

This fixes an issue where the text would look very small on macOS.
Andreas Kling hace 9 meses
padre
commit
72f4253911
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Userland/Libraries/LibWeb/Painting/PaintableBox.cpp

+ 1 - 1
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<int>();
         auto size_text_device_rect = context.enclosing_device_rect(size_text_rect).to_type<int>();
         context.display_list_recorder().fill_rect(size_text_device_rect, context.palette().color(Gfx::ColorRole::Tooltip));
         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_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));
     }
     }
 }
 }