From ca1f51e70628482a680c79cab4b2f322a75fbbe9 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh <stambaughw@gmail.com> Date: Sat, 21 Dec 2024 11:54:49 -0500 Subject: [PATCH] Make settings migration dialog re-sizable. Also try to improve the initial layout size after changes have been made to controls outside the base dialog Curt. Fixes https://gitlab.com/kicad/code/kicad/-/issues/19347 --- common/dialogs/dialog_migrate_settings.cpp | 3 +- .../dialogs/dialog_migrate_settings_base.cpp | 2 +- .../dialogs/dialog_migrate_settings_base.fbp | 88 ++++++++++--------- common/dialogs/dialog_migrate_settings_base.h | 5 +- 4 files changed, 50 insertions(+), 48 deletions(-) diff --git a/common/dialogs/dialog_migrate_settings.cpp b/common/dialogs/dialog_migrate_settings.cpp index 15effa13c9..2c5b15bf00 100644 --- a/common/dialogs/dialog_migrate_settings.cpp +++ b/common/dialogs/dialog_migrate_settings.cpp @@ -39,7 +39,8 @@ DIALOG_MIGRATE_SETTINGS::DIALOG_MIGRATE_SETTINGS( SETTINGS_MANAGER* aManager ) : SetupStandardButtons(); - GetSizer()->SetSizeHints( this ); + Layout(); + m_sizer->Fit( this ); Centre(); } diff --git a/common/dialogs/dialog_migrate_settings_base.cpp b/common/dialogs/dialog_migrate_settings_base.cpp index a5893dfcb9..39671f3f15 100644 --- a/common/dialogs/dialog_migrate_settings_base.cpp +++ b/common/dialogs/dialog_migrate_settings_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! diff --git a/common/dialogs/dialog_migrate_settings_base.fbp b/common/dialogs/dialog_migrate_settings_base.fbp index 94a58407ea..3e68903ba4 100644 --- a/common/dialogs/dialog_migrate_settings_base.fbp +++ b/common/dialogs/dialog_migrate_settings_base.fbp @@ -1,34 +1,36 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <wxFormBuilder_Project> - <FileVersion major="1" minor="17"/> + <FileVersion major="1" minor="18"/> <object class="Project" expanded="true"> - <property name="class_decoration">KICOMMON_API; kicommon.h</property> <property name="code_generation">C++</property> - <property name="disconnect_events">1</property> - <property name="disconnect_mode">source_name</property> - <property name="disconnect_php_events">0</property> - <property name="disconnect_python_events">0</property> + <property name="cpp_class_decoration">KICOMMON_API; kicommon.h</property> + <property name="cpp_disconnect_events">1</property> + <property name="cpp_event_generation">connect</property> + <property name="cpp_help_provider">none</property> + <property name="cpp_namespace"></property> + <property name="cpp_precompiled_header"></property> + <property name="cpp_use_array_enum">0</property> + <property name="cpp_use_enum">0</property> <property name="embedded_files_path">res</property> <property name="encoding">UTF-8</property> - <property name="event_generation">connect</property> <property name="file">dialog_migrate_settings_base</property> <property name="first_id">1000</property> - <property name="help_provider">none</property> - <property name="image_path_wrapper_function_name"></property> - <property name="indent_with_spaces"></property> <property name="internationalize">1</property> + <property name="lua_skip_events">1</property> + <property name="lua_ui_table">UI</property> <property name="name">DIALOG_MIGRATE_SETTINGS</property> - <property name="namespace"></property> <property name="path">.</property> - <property name="precompiled_header"></property> + <property name="php_disconnect_events">0</property> + <property name="php_disconnect_mode">source_name</property> + <property name="php_skip_events">1</property> + <property name="python_disconnect_events">0</property> + <property name="python_disconnect_mode">source_name</property> + <property name="python_image_path_wrapper_function_name"></property> + <property name="python_indent_with_spaces"></property> + <property name="python_skip_events">1</property> <property name="relative_path">1</property> - <property name="skip_lua_events">1</property> - <property name="skip_php_events">1</property> - <property name="skip_python_events">1</property> - <property name="ui_table">UI</property> - <property name="use_array_enum">0</property> - <property name="use_enum">0</property> <property name="use_microsoft_bom">0</property> + <property name="use_native_eol">0</property> <object class="Dialog" expanded="true"> <property name="aui_managed">0</property> <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property> @@ -49,7 +51,7 @@ <property name="name">DIALOG_MIGRATE_SETTINGS_BASE</property> <property name="pos"></property> <property name="size"></property> - <property name="style">wxCAPTION</property> + <property name="style">wxCAPTION|wxRESIZE_BORDER</property> <property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property> <property name="title">Configure KiCad Settings Path</property> <property name="tooltip"></property> @@ -80,10 +82,10 @@ <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> - <property name="aui_layer"></property> + <property name="aui_layer">0</property> <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> + <property name="aui_position">0</property> + <property name="aui_row">0</property> <property name="best_size"></property> <property name="bg"></property> <property name="caption"></property> @@ -152,10 +154,10 @@ <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> - <property name="aui_layer"></property> + <property name="aui_layer">0</property> <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> + <property name="aui_position">0</property> + <property name="aui_row">0</property> <property name="best_size"></property> <property name="bg"></property> <property name="caption"></property> @@ -214,10 +216,10 @@ <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> - <property name="aui_layer"></property> + <property name="aui_layer">0</property> <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> + <property name="aui_position">0</property> + <property name="aui_row">0</property> <property name="best_size"></property> <property name="bg"></property> <property name="caption"></property> @@ -299,10 +301,10 @@ <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> - <property name="aui_layer"></property> + <property name="aui_layer">0</property> <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> + <property name="aui_position">0</property> + <property name="aui_row">0</property> <property name="best_size"></property> <property name="bg"></property> <property name="caption"></property> @@ -368,10 +370,10 @@ <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> - <property name="aui_layer"></property> + <property name="aui_layer">0</property> <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> + <property name="aui_position">0</property> + <property name="aui_row">0</property> <property name="auth_needed">0</property> <property name="best_size"></property> <property name="bg"></property> @@ -445,10 +447,10 @@ <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> - <property name="aui_layer"></property> + <property name="aui_layer">0</property> <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> + <property name="aui_position">0</property> + <property name="aui_row">0</property> <property name="best_size"></property> <property name="bg"></property> <property name="caption"></property> @@ -507,10 +509,10 @@ <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> - <property name="aui_layer"></property> + <property name="aui_layer">0</property> <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> + <property name="aui_position">0</property> + <property name="aui_row">0</property> <property name="best_size"></property> <property name="bg"></property> <property name="caption"></property> @@ -572,10 +574,10 @@ <property name="LeftDockable">1</property> <property name="RightDockable">1</property> <property name="TopDockable">1</property> - <property name="aui_layer"></property> + <property name="aui_layer">0</property> <property name="aui_name"></property> - <property name="aui_position"></property> - <property name="aui_row"></property> + <property name="aui_position">0</property> + <property name="aui_row">0</property> <property name="best_size"></property> <property name="bg"></property> <property name="caption"></property> diff --git a/common/dialogs/dialog_migrate_settings_base.h b/common/dialogs/dialog_migrate_settings_base.h index 4b9c443c70..f07f2de427 100644 --- a/common/dialogs/dialog_migrate_settings_base.h +++ b/common/dialogs/dialog_migrate_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -34,7 +34,6 @@ class STD_BITMAP_BUTTON; /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_MIGRATE_SETTINGS_BASE /////////////////////////////////////////////////////////////////////////////// @@ -66,7 +65,7 @@ class KICOMMON_API DIALOG_MIGRATE_SETTINGS_BASE : public DIALOG_SHIM public: - DIALOG_MIGRATE_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure KiCad Settings Path"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION ); + DIALOG_MIGRATE_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Configure KiCad Settings Path"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxRESIZE_BORDER ); ~DIALOG_MIGRATE_SETTINGS_BASE();