diff options
author | Andreas Kling <kling@serenityos.org> | 2023-01-03 14:43:07 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-01-03 15:25:02 +0100 |
commit | 3407ab0fd1c287391cad8cb89e4a36fa3a07c453 (patch) | |
tree | 77c03fa1636b89088423831aadc4fe0005e898a3 /Userland/Libraries/LibGUI/HeaderView.cpp | |
parent | b9d2b8f7b2ef05d62949b8f1c17016428f7c661c (diff) | |
download | serenity-3407ab0fd1c287391cad8cb89e4a36fa3a07c453.zip |
LibGfx: Make Font::width() return a float
Diffstat (limited to 'Userland/Libraries/LibGUI/HeaderView.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/HeaderView.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/HeaderView.cpp b/Userland/Libraries/LibGUI/HeaderView.cpp index 4a3264f4de..c29586dd0c 100644 --- a/Userland/Libraries/LibGUI/HeaderView.cpp +++ b/Userland/Libraries/LibGUI/HeaderView.cpp @@ -272,7 +272,7 @@ void HeaderView::paint_horizontal(Painter& painter) painter.draw_text(text_rect, text, font(), section_data.alignment, palette().button_text()); if (is_key_column && (m_table_view.sort_order() != SortOrder::None)) { - Gfx::IntPoint offset { text_rect.x() + font().width(text) + sorting_arrow_offset, sorting_arrow_offset }; + Gfx::IntPoint offset { text_rect.x() + static_cast<int>(ceilf(font().width(text))) + sorting_arrow_offset, sorting_arrow_offset }; auto coordinates = m_table_view.sort_order() == SortOrder::Ascending ? ascending_arrow_coordinates.span() : descending_arrow_coordinates.span(); |