LibGUI: Use String::formatted() and String::number() more

This commit is contained in:
Andreas Kling 2021-01-03 14:51:17 +01:00
parent 5e157eaf37
commit f181ddb56a
Notes: sideshowbarker 2024-07-19 00:10:10 +09:00
9 changed files with 17 additions and 20 deletions

View file

@ -274,7 +274,7 @@ void HeaderView::paint_vertical(Painter& painter)
bool pressed = section == m_pressed_section && m_pressed_section_is_pressed;
bool hovered = false;
Gfx::StylePainter::paint_button(painter, cell_rect, palette(), Gfx::ButtonStyle::Normal, pressed, hovered);
String text = String::format("%d", section);
String text = String::number(section);
auto text_rect = cell_rect.shrunken(m_table_view.horizontal_padding() * 2, 0);
if (pressed)
text_rect.move_by(1, 1);