|
@@ -5,6 +5,7 @@
|
|
|
*/
|
|
|
|
|
|
#include "CreateNewImageDialog.h"
|
|
|
+#include <LibConfig/Client.h>
|
|
|
#include <LibGUI/BoxLayout.h>
|
|
|
#include <LibGUI/Button.h>
|
|
|
#include <LibGUI/Label.h>
|
|
@@ -33,6 +34,8 @@ CreateNewImageDialog::CreateNewImageDialog(GUI::Window* parent_window)
|
|
|
m_name_textbox->on_change = [this] {
|
|
|
m_image_name = m_name_textbox->text();
|
|
|
};
|
|
|
+ auto default_name = Config::read_string("PixelPaint", "NewImage", "Name");
|
|
|
+ m_name_textbox->set_text(default_name);
|
|
|
|
|
|
auto& width_label = main_widget.add<GUI::Label>("Width:");
|
|
|
width_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
|
@@ -72,8 +75,10 @@ CreateNewImageDialog::CreateNewImageDialog(GUI::Window* parent_window)
|
|
|
width_spinbox.set_range(1, 16384);
|
|
|
height_spinbox.set_range(1, 16384);
|
|
|
|
|
|
- width_spinbox.set_value(510);
|
|
|
- height_spinbox.set_value(356);
|
|
|
+ auto default_width = Config::read_i32("PixelPaint", "NewImage", "Width", 510);
|
|
|
+ auto default_height = Config::read_i32("PixelPaint", "NewImage", "Height", 356);
|
|
|
+ width_spinbox.set_value(default_width);
|
|
|
+ height_spinbox.set_value(default_height);
|
|
|
}
|
|
|
|
|
|
}
|