mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:57:44 +00:00
LibWeb: Paint video timestamps using CSS/device pixel-aware scaled fonts
The timestamp text was very tiny on a HiDPI display.
This commit is contained in:
parent
848078aedd
commit
ab1244a160
1 changed files with 3 additions and 1 deletions
|
@ -300,7 +300,9 @@ DevicePixelRect VideoPaintable::paint_control_bar_timestamp(PaintContext& contex
|
|||
|
||||
auto timestamp_rect = control_box_rect;
|
||||
timestamp_rect.set_width(timestamp_size);
|
||||
context.painter().draw_text(timestamp_rect.to_type<int>(), timestamp, Gfx::TextAlignment::CenterLeft, Color::White);
|
||||
|
||||
auto const& scaled_font = layout_node().scaled_font(context);
|
||||
context.painter().draw_text(timestamp_rect.to_type<int>(), timestamp, scaled_font, Gfx::TextAlignment::CenterLeft, Color::White);
|
||||
|
||||
control_box_rect.take_from_left(timestamp_rect.width());
|
||||
return control_box_rect;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue