1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

DisplaySettings: Use format instead of printf.

This commit is contained in:
asynts 2020-10-04 21:14:40 +02:00 committed by Andreas Kling
parent 9efc69a6e2
commit 7fd4646acb
2 changed files with 3 additions and 3 deletions

View file

@ -338,14 +338,14 @@ void DisplaySettingsWidget::send_settings_to_window_server()
{
auto result = GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::SetResolution>(m_monitor_widget->desktop_resolution());
if (!result->success()) {
GUI::MessageBox::show(root_widget()->window(), String::format("Reverting to resolution %dx%d", result->resolution().width(), result->resolution().height()),
GUI::MessageBox::show(root_widget()->window(), String::formatted("Reverting to resolution {}x{}", result->resolution().width(), result->resolution().height()),
"Unable to set resolution", GUI::MessageBox::Type::Error);
}
if (!m_monitor_widget->wallpaper().is_empty()) {
GUI::Desktop::the().set_wallpaper(m_monitor_widget->wallpaper());
} else {
dbg() << "Setting color input: __" << m_color_input->text() << "__";
dbgln("Setting color input: __{}__", m_color_input->text());
GUI::Desktop::the().set_wallpaper("");
GUI::Desktop::the().set_background_color(m_color_input->text());
}