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

Everywhere: Convert a handful of String::format() => formatted()

This commit is contained in:
Andreas Kling 2021-01-16 12:00:33 +01:00
parent c90b7881a7
commit c71807a3fc
23 changed files with 24 additions and 24 deletions

View file

@ -761,7 +761,7 @@ bool Compositor::draw_geometry_label(Gfx::IntRect& geometry_label_damage_rect)
if (!window_being_moved_or_resized->size_increment().is_null()) {
int width_steps = (window_being_moved_or_resized->width() - window_being_moved_or_resized->base_size().width()) / window_being_moved_or_resized->size_increment().width();
int height_steps = (window_being_moved_or_resized->height() - window_being_moved_or_resized->base_size().height()) / window_being_moved_or_resized->size_increment().height();
geometry_string = String::format("%s (%dx%d)", geometry_string.characters(), width_steps, height_steps);
geometry_string = String::formatted("{} ({}x{})", geometry_string, width_steps, height_steps);
}
auto geometry_label_rect = Gfx::IntRect { 0, 0, wm.font().width(geometry_string) + 16, wm.font().glyph_height() + 10 };
geometry_label_rect.center_within(window_being_moved_or_resized->rect());

View file

@ -77,7 +77,7 @@ int main(int, char**)
auto wm_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
auto theme_name = wm_config->read_entry("Theme", "Name", "Default");
auto theme = Gfx::load_system_theme(String::format("/res/themes/%s.ini", theme_name.characters()));
auto theme = Gfx::load_system_theme(String::formatted("/res/themes/{}.ini", theme_name));
ASSERT(theme);
Gfx::set_system_theme(*theme);
auto palette = Gfx::PaletteImpl::create_with_shared_buffer(*theme);