mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibGfx: Join ScaledFont into Font
Since ScaledFont is the only class inherited from Font we could simply merge them.
This commit is contained in:
parent
16e883a9a3
commit
8e2d1559ec
Notes:
github-actions[bot]
2025-04-21 07:52:41 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 8e2d1559ec
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4409
18 changed files with 166 additions and 234 deletions
|
@ -118,7 +118,7 @@ MediaPaintable::Components MediaPaintable::compute_control_bar_components(PaintC
|
|||
auto display_time = human_readable_digital_time(round(media_element.layout_display_time({})));
|
||||
auto duration = human_readable_digital_time(isnan(media_element.duration()) ? 0 : round(media_element.duration()));
|
||||
components.timestamp = String::formatted("{} / {}", display_time, duration).release_value_but_fixme_should_propagate_errors();
|
||||
components.timestamp_font = layout_node().scaled_font(context);
|
||||
components.timestamp_font = layout_node().font(context);
|
||||
|
||||
auto timestamp_size = DevicePixels { static_cast<DevicePixels::Type>(ceilf(components.timestamp_font->width(components.timestamp))) };
|
||||
if (timestamp_size <= remaining_rect.width()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue