1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

LibGUI: Convert StringBuilder::appendf() => AK::Format

This commit is contained in:
Andreas Kling 2021-05-07 16:32:31 +02:00
parent 5b87276841
commit 8d5eb075d8
2 changed files with 12 additions and 13 deletions

View file

@ -66,9 +66,9 @@ void Progressbar::paint_event(PaintEvent& event)
if (m_format == Format::Percentage) {
float range_size = m_max - m_min;
float progress = (m_value - m_min) / range_size;
builder.appendf("%d%%", (int)(progress * 100));
builder.appendff("{}%", (int)(progress * 100));
} else if (m_format == Format::ValueSlashMax) {
builder.appendf("%d/%d", m_value, m_max);
builder.appendff("{}/{}", m_value, m_max);
}
progress_text = builder.to_string();
}