mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-11 18:25:03 +00:00
AK: Add String::number() for creating a String from a number.
Instead of manually doing String::format("%d"/"%u") everywhere, let's have
a String API for this. It's just a wrapper around format() for now, but it
could be made more efficient in the future.
This commit is contained in:
@@ -292,7 +292,7 @@ void GTextEditor::paint_event(GPaintEvent& event)
|
||||
auto ruler_line_rect = ruler_content_rect(i);
|
||||
painter.draw_text(
|
||||
ruler_line_rect.shrunken(2, 0),
|
||||
String::format("%u", i),
|
||||
String::number(i),
|
||||
is_current_line ? Font::default_bold_font() : font(),
|
||||
TextAlignment::CenterRight,
|
||||
is_current_line ? Color::DarkGray : Color::MidGray);
|
||||
|
||||
Reference in New Issue
Block a user