LibGfx: Join ScaledFont into Font

Since ScaledFont is the only class inherited from Font we could simply
merge them.
This commit is contained in:
Aliaksandr Kalenik 2025-04-19 19:10:01 +02:00 committed by Andreas Kling
commit 8e2d1559ec
Notes: github-actions[bot] 2025-04-21 07:52:41 +00:00
18 changed files with 166 additions and 234 deletions

View file

@ -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()) {