From b71c7a6e44981c35ae93c91944e6cff70006285d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 3 Mar 2023 19:32:19 +0100 Subject: Userland: Use Font::pixel_size_rounded_up() instead of glyph_height() The only remaining clients of this API are specific to bitmap fonts and editing thereof. --- Userland/Services/Taskbar/TaskbarButton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Services/Taskbar') diff --git a/Userland/Services/Taskbar/TaskbarButton.cpp b/Userland/Services/Taskbar/TaskbarButton.cpp index 5b8d748438..d731d0000f 100644 --- a/Userland/Services/Taskbar/TaskbarButton.cpp +++ b/Userland/Services/Taskbar/TaskbarButton.cpp @@ -106,7 +106,7 @@ void TaskbarButton::paint_event(GUI::PaintEvent& event) content_rect.set_width(content_rect.width() - icon.width() - 4); } - Gfx::IntRect text_rect { 0, 0, static_cast(ceilf(font.width(text()))), font.glyph_height() }; + Gfx::IntRect text_rect { 0, 0, static_cast(ceilf(font.width(text()))), font.pixel_size_rounded_up() }; if (text_rect.width() > content_rect.width()) text_rect.set_width(content_rect.width()); text_rect.align_within(content_rect, text_alignment()); -- cgit v1.2.3