From 13e526de43847ac86d74e3cb0be2d6b930f1d46f Mon Sep 17 00:00:00 2001 From: Marcus Nilsson Date: Thu, 1 Jul 2021 00:09:48 +0200 Subject: [PATCH] PixelPaint: Change the default layer name to "Layer" Change the default layer name to "Layer" and enable the user to press return to quickly close the dialog. --- Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp b/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp index cd9f89fa4a..c0b46f8aae 100644 --- a/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp +++ b/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp @@ -30,6 +30,8 @@ CreateNewLayerDialog::CreateNewLayerDialog(Gfx::IntSize const& suggested_size, G name_label.set_text_alignment(Gfx::TextAlignment::CenterLeft); m_name_textbox = main_widget.add(); + m_name_textbox->set_text("Layer"); + m_name_textbox->select_all(); m_name_textbox->on_change = [this] { m_layer_name = m_name_textbox->text(); }; @@ -65,6 +67,10 @@ CreateNewLayerDialog::CreateNewLayerDialog(Gfx::IntSize const& suggested_size, G m_layer_size.set_height(value); }; + m_name_textbox->on_return_pressed = [this] { + done(ExecOK); + }; + width_spinbox.set_range(1, 16384); height_spinbox.set_range(1, 16384);