From 0fa6c24d8e0a4b82542948790b5860059b11f764 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 23 Feb 2022 20:44:41 +0100 Subject: [PATCH] Improve editor preferences --- src/preferences/EditorPrefsPanelBF.cpp | 9 +- src/preferences/EditorPrefsPanelBF.h | 2 + tools/wxframebuilder/EditorPrefs.fbp | 129 ++++++++++++++++++++++++- 3 files changed, 136 insertions(+), 4 deletions(-) diff --git a/src/preferences/EditorPrefsPanelBF.cpp b/src/preferences/EditorPrefsPanelBF.cpp index 5cc9ae2..9b37d1f 100644 --- a/src/preferences/EditorPrefsPanelBF.cpp +++ b/src/preferences/EditorPrefsPanelBF.cpp @@ -46,9 +46,16 @@ EditorPrefsPanelBF::EditorPrefsPanelBF( wxWindow* parent, wxWindowID id, const w row_size_label->Wrap( -1 ); main_sizer->Add( row_size_label, 0, wxALL, 5 ); - row_size = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 ); + row_size = new wxSpinCtrl( this, wxID_ANY, wxT("100"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 ); main_sizer->Add( row_size, 0, wxALL, 5 ); + col_size_label = new wxStaticText( this, wxID_ANY, wxT("Move column size"), wxDefaultPosition, wxDefaultSize, 0 ); + col_size_label->Wrap( -1 ); + main_sizer->Add( col_size_label, 0, wxALL, 5 ); + + col_size = new wxSpinCtrl( this, wxID_ANY, wxT("50"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0 ); + main_sizer->Add( col_size, 0, wxALL, 5 ); + show_move_icons = new wxCheckBox( this, wxID_ANY, wxT("Show move icons"), wxDefaultPosition, wxDefaultSize, 0 ); main_sizer->Add( show_move_icons, 0, wxALL, 5 ); diff --git a/src/preferences/EditorPrefsPanelBF.h b/src/preferences/EditorPrefsPanelBF.h index 518338e..0f3a011 100644 --- a/src/preferences/EditorPrefsPanelBF.h +++ b/src/preferences/EditorPrefsPanelBF.h @@ -42,6 +42,8 @@ class EditorPrefsPanelBF : public wxPanel wxColourPickerCtrl* color_commentbg; wxStaticText* row_size_label; wxSpinCtrl* row_size; + wxStaticText* col_size_label; + wxSpinCtrl* col_size; wxCheckBox* show_move_icons; public: diff --git a/tools/wxframebuilder/EditorPrefs.fbp b/tools/wxframebuilder/EditorPrefs.fbp index ae6ffba..e31aebb 100644 --- a/tools/wxframebuilder/EditorPrefs.fbp +++ b/tools/wxframebuilder/EditorPrefs.fbp @@ -650,11 +650,11 @@ 0 wxID_ANY 0 - 10 + 70 0 - 0 + 30 0 @@ -673,7 +673,130 @@ ; ; forward_declare 0 - + 50 + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Move column size + 0 + + 0 + + + 0 + + 1 + col_size_label + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 0 + 120 + + 0 + + 80 + + 0 + + 1 + col_size + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS + ; ; forward_declare + 0 + + 100