Skip to content

Commit 30157d9

Browse files
committed
Correct parent structure of the standard dialog buttons vis-a-vis sizers.
1 parent cbcf818 commit 30157d9

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/gui/dlabout.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ AboutDialog::AboutDialog(wxWindow *p_parent)
7676

7777
auto *panel = new wxPanel(this);
7878

79-
auto *root = new wxBoxSizer(wxVERTICAL);
8079
auto *top = new wxBoxSizer(wxHORIZONTAL);
8180

8281
// --- Left brand rail (fixed width, centered logo) ---
@@ -138,15 +137,16 @@ AboutDialog::AboutDialog(wxWindow *p_parent)
138137

139138
top->Add(textCol, 1, wxEXPAND);
140139

141-
root->Add(top, 1, wxALL | wxEXPAND, M);
140+
auto *panelSizer = new wxBoxSizer(wxVERTICAL);
141+
panelSizer->Add(top, 1, wxALL | wxEXPAND, M);
142+
panel->SetSizer(panelSizer);
142143

143-
root->Add(CreateStdDialogButtonSizer(wxOK), 0, wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_RIGHT, M);
144+
auto *dialogSizer = new wxBoxSizer(wxVERTICAL);
145+
dialogSizer->Add(panel, 1, wxEXPAND);
146+
dialogSizer->Add(CreateStdDialogButtonSizer(wxOK), 0,
147+
wxLEFT | wxRIGHT | wxBOTTOM | wxALIGN_RIGHT, M);
144148

145-
panel->SetSizer(root);
146-
147-
auto *dlgSizer = new wxBoxSizer(wxVERTICAL);
148-
dlgSizer->Add(panel, 1, wxEXPAND);
149-
SetSizerAndFit(dlgSizer);
149+
SetSizerAndFit(dialogSizer);
150150
CentreOnParent();
151151
}
152152

0 commit comments

Comments
 (0)