@@ -100,24 +100,28 @@ LayoutNodesPanel::LayoutNodesPanel(wxWindow *p_parent, const TreeRenderConfig &p
100100 gridSizer->Add (new wxStaticText (this , wxID_ANY, _ (" Horizontal size of nodes" )), 0 ,
101101 wxALIGN_CENTER_VERTICAL | wxALL, 5 );
102102
103- constexpr int NODE_LENGTH_MIN = 5 ;
104- constexpr int NODE_LENGTH_MAX = 100 ;
105-
106- m_nodeSize = new wxSpinCtrl (this , wxID_ANY, wxString::Format (_T (" %d" ), p_settings.GetNodeSize ()),
107- wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, NODE_LENGTH_MIN,
108- NODE_LENGTH_MAX);
109- gridSizer->Add (m_nodeSize, 1 , wxEXPAND | wxALL, 5 );
103+ {
104+ constexpr int NODE_LENGTH_MIN = 5 ;
105+ constexpr int NODE_LENGTH_MAX = 100 ;
106+ wxString label;
107+ label << p_settings.GetNodeSize ();
108+ m_nodeSize = new wxSpinCtrl (this , wxID_ANY, label, wxDefaultPosition, wxDefaultSize,
109+ wxSP_ARROW_KEYS, NODE_LENGTH_MIN, NODE_LENGTH_MAX);
110+ gridSizer->Add (m_nodeSize, 1 , wxEXPAND | wxALL, 5 );
111+ }
110112
111113 gridSizer->Add (new wxStaticText (this , wxID_ANY, _ (" Vertical spacing between terminal nodes" )), 0 ,
112114 wxALIGN_CENTER_VERTICAL | wxALL, 5 );
113115
114- constexpr int Y_SPACING_MIN = 15 ;
115- constexpr int Y_SPACING_MAX = 60 ;
116-
117- m_terminalSpacing = new wxSpinCtrl (
118- this , wxID_ANY, wxString::Format (_T (" %d" ), p_settings.GetTerminalSpacing ()),
119- wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, Y_SPACING_MIN, Y_SPACING_MAX);
120- gridSizer->Add (m_terminalSpacing, 1 , wxEXPAND | wxALL, 5 );
116+ {
117+ constexpr int Y_SPACING_MIN = 15 ;
118+ constexpr int Y_SPACING_MAX = 60 ;
119+ wxString label;
120+ label << p_settings.GetTerminalSpacing ();
121+ m_terminalSpacing = new wxSpinCtrl (this , wxID_ANY, label, wxDefaultPosition, wxDefaultSize,
122+ wxSP_ARROW_KEYS, Y_SPACING_MIN, Y_SPACING_MAX);
123+ gridSizer->Add (m_terminalSpacing, 1 , wxEXPAND | wxALL, 5 );
124+ }
121125
122126 sizeSizer->Add (gridSizer, 1 , wxALL | wxEXPAND, 5 );
123127 topSizer->Add (sizeSizer, 0 , wxALL | wxALIGN_CENTER, 5 );
@@ -151,12 +155,6 @@ class LayoutBranchesPanel : public wxPanel {
151155LayoutBranchesPanel::LayoutBranchesPanel (wxWindow *p_parent, const TreeRenderConfig &p_settings)
152156 : wxPanel(p_parent, wxID_ANY)
153157{
154- constexpr int BRANCH_LENGTH_MIN = 0 ;
155- constexpr int BRANCH_LENGTH_MAX = 100 ;
156-
157- constexpr int TINE_LENGTH_MIN = 20 ;
158- constexpr int TINE_LENGTH_MAX = 100 ;
159-
160158 auto *topSizer = new wxBoxSizer (wxVERTICAL);
161159
162160 auto *styleBoxSizer = new wxStaticBoxSizer (wxHORIZONTAL, this , _ (" Drawing branches" ));
@@ -186,19 +184,29 @@ LayoutBranchesPanel::LayoutBranchesPanel(wxWindow *p_parent, const TreeRenderCon
186184 auto *gridSizer = new wxFlexGridSizer (2 );
187185 gridSizer->AddGrowableCol (1 );
188186
189- gridSizer->Add (new wxStaticText (this , wxID_ANY, _ (" size of branch fork" )), 0 ,
190- wxALIGN_CENTER_VERTICAL | wxALL, 5 );
191- m_branchLength = new wxSpinCtrl (
192- this , wxID_ANY, wxString::Format (_T (" %d" ), p_settings.GetBranchLength ()), wxDefaultPosition,
193- wxDefaultSize, wxSP_ARROW_KEYS, BRANCH_LENGTH_MIN, BRANCH_LENGTH_MAX);
194- gridSizer->Add (m_branchLength, 1 , wxALL | wxEXPAND, 5 );
187+ {
188+ constexpr int BRANCH_LENGTH_MIN = 0 ;
189+ constexpr int BRANCH_LENGTH_MAX = 100 ;
190+ gridSizer->Add (new wxStaticText (this , wxID_ANY, _ (" size of branch fork" )), 0 ,
191+ wxALIGN_CENTER_VERTICAL | wxALL, 5 );
192+ wxString label;
193+ label << p_settings.GetBranchLength ();
194+ m_branchLength = new wxSpinCtrl (this , wxID_ANY, label, wxDefaultPosition, wxDefaultSize,
195+ wxSP_ARROW_KEYS, BRANCH_LENGTH_MIN, BRANCH_LENGTH_MAX);
196+ gridSizer->Add (m_branchLength, 1 , wxALL | wxEXPAND, 5 );
197+ }
195198
196- gridSizer->Add (new wxStaticText (this , wxID_ANY, _ (" size of branch tine" )), 1 ,
197- wxALIGN_CENTER_VERTICAL | wxALL, 5 );
198- m_tineLength = new wxSpinCtrl (
199- this , wxID_ANY, wxString::Format (_T (" %d" ), p_settings.GetTineLength ()), wxDefaultPosition,
200- wxDefaultSize, wxSP_ARROW_KEYS, TINE_LENGTH_MIN, TINE_LENGTH_MAX);
201- gridSizer->Add (m_tineLength, 1 , wxALL | wxEXPAND, 5 );
199+ {
200+ constexpr int TINE_LENGTH_MIN = 20 ;
201+ constexpr int TINE_LENGTH_MAX = 100 ;
202+ gridSizer->Add (new wxStaticText (this , wxID_ANY, _ (" size of branch tine" )), 1 ,
203+ wxALIGN_CENTER_VERTICAL | wxALL, 5 );
204+ wxString label;
205+ label << p_settings.GetTineLength ();
206+ m_tineLength = new wxSpinCtrl (this , wxID_ANY, label, wxDefaultPosition, wxDefaultSize,
207+ wxSP_ARROW_KEYS, TINE_LENGTH_MIN, TINE_LENGTH_MAX);
208+ gridSizer->Add (m_tineLength, 1 , wxALL | wxEXPAND, 5 );
209+ }
202210
203211 lengthSizer->Add (gridSizer, 1 , wxALL | wxEXPAND, 5 );
204212 topSizer->Add (lengthSizer, 0 , wxALL | wxALIGN_CENTER, 5 );
0 commit comments