mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibGfx+Userland: Add width_rounded_up() helper
This commit is contained in:
parent
c9404c3a63
commit
55423b4ed0
21 changed files with 34 additions and 19 deletions
|
@ -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() + static_cast<int>(ceilf(font().width(text))) + sorting_arrow_offset, sorting_arrow_offset };
|
||||
Gfx::IntPoint offset { text_rect.x() + font().width_rounded_up(text) + sorting_arrow_offset, sorting_arrow_offset };
|
||||
auto coordinates = m_table_view.sort_order() == SortOrder::Ascending
|
||||
? ascending_arrow_coordinates.span()
|
||||
: descending_arrow_coordinates.span();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue