summaryrefslogtreecommitdiff
path: root/Userland/Services/Taskbar
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-03-03 19:32:19 +0100
committerAndreas Kling <kling@serenityos.org>2023-03-04 00:29:38 +0100
commitb71c7a6e44981c35ae93c91944e6cff70006285d (patch)
tree0b7fc5d68ed0559ecf6ce4db9a7f18f3334e3ee8 /Userland/Services/Taskbar
parent93c9344e3558fee71deb5067e68146582891b319 (diff)
downloadserenity-b71c7a6e44981c35ae93c91944e6cff70006285d.zip
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.
Diffstat (limited to 'Userland/Services/Taskbar')
-rw-r--r--Userland/Services/Taskbar/TaskbarButton.cpp2
1 files changed, 1 insertions, 1 deletions
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<int>(ceilf(font.width(text()))), font.glyph_height() };
+ Gfx::IntRect text_rect { 0, 0, static_cast<int>(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());