mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
DisplaySettings: Use format instead of printf.
This commit is contained in:
parent
9efc69a6e2
commit
7fd4646acb
2 changed files with 3 additions and 3 deletions
|
@ -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());
|
auto result = GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::SetResolution>(m_monitor_widget->desktop_resolution());
|
||||||
if (!result->success()) {
|
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);
|
"Unable to set resolution", GUI::MessageBox::Type::Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_monitor_widget->wallpaper().is_empty()) {
|
if (!m_monitor_widget->wallpaper().is_empty()) {
|
||||||
GUI::Desktop::the().set_wallpaper(m_monitor_widget->wallpaper());
|
GUI::Desktop::the().set_wallpaper(m_monitor_widget->wallpaper());
|
||||||
} else {
|
} 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_wallpaper("");
|
||||||
GUI::Desktop::the().set_background_color(m_color_input->text());
|
GUI::Desktop::the().set_background_color(m_color_input->text());
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ int main(int argc, char** argv)
|
||||||
auto instance = DisplaySettingsWidget::construct();
|
auto instance = DisplaySettingsWidget::construct();
|
||||||
|
|
||||||
auto window = GUI::Window::construct();
|
auto window = GUI::Window::construct();
|
||||||
dbg() << "main window: " << window;
|
dbgln("main window: {}", window);
|
||||||
window->set_title("Display settings");
|
window->set_title("Display settings");
|
||||||
window->resize(360, 390);
|
window->resize(360, 390);
|
||||||
window->set_resizable(false);
|
window->set_resizable(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue