summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Breadcrumbbar.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-01-03 14:43:07 +0100
committerAndreas Kling <kling@serenityos.org>2023-01-03 15:25:02 +0100
commit3407ab0fd1c287391cad8cb89e4a36fa3a07c453 (patch)
tree77c03fa1636b89088423831aadc4fe0005e898a3 /Userland/Libraries/LibGUI/Breadcrumbbar.cpp
parentb9d2b8f7b2ef05d62949b8f1c17016428f7c661c (diff)
downloadserenity-3407ab0fd1c287391cad8cb89e4a36fa3a07c453.zip
LibGfx: Make Font::width() return a float
Diffstat (limited to 'Userland/Libraries/LibGUI/Breadcrumbbar.cpp')
-rw-r--r--Userland/Libraries/LibGUI/Breadcrumbbar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/Breadcrumbbar.cpp b/Userland/Libraries/LibGUI/Breadcrumbbar.cpp
index 385df6ae78..e9af6543f2 100644
--- a/Userland/Libraries/LibGUI/Breadcrumbbar.cpp
+++ b/Userland/Libraries/LibGUI/Breadcrumbbar.cpp
@@ -109,10 +109,10 @@ void Breadcrumbbar::append_segment(DeprecatedString text, Gfx::Bitmap const* ico
auto button_width = min(button_text_width + icon_width + icon_padding + 16, max_button_width);
auto shrunken_width = icon_width + icon_padding + (icon ? 4 : 16);
- button.set_max_size(button_width, 16 + 8);
+ button.set_max_size(static_cast<int>(ceilf(button_width)), 16 + 8);
button.set_min_size(shrunken_width, 16 + 8);
- Segment segment { icon, text, data, button_width, shrunken_width, button.make_weak_ptr<GUI::Button>() };
+ Segment segment { icon, text, data, static_cast<int>(ceilf(button_width)), shrunken_width, button.make_weak_ptr<GUI::Button>() };
m_segments.append(move(segment));
relayout();