mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
LibGUI: Convert StringBuilder::appendf() => AK::Format
This commit is contained in:
parent
5b87276841
commit
8d5eb075d8
2 changed files with 12 additions and 13 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue