From 964f2ee0c5166e8ccda8dacd5efad10b6d3b8dfe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 23 Feb 2023 19:03:59 +0000 Subject: [PATCH] Stop centering text in the generic "About" dialog This didn't look good with the icon on the left, so left-justify the text too, which also seems to be much more standard under MSW, where this dialog is probably going to be used most often. --- src/generic/aboutdlgg.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/generic/aboutdlgg.cpp b/src/generic/aboutdlgg.cpp index e3a01f6da4..08dcbedb6c 100644 --- a/src/generic/aboutdlgg.cpp +++ b/src/generic/aboutdlgg.cpp @@ -146,7 +146,7 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info, wxWindow* paren fontBig.SetWeight(wxFONTWEIGHT_BOLD); label->SetFont(fontBig); - m_sizerText->Add(label, wxSizerFlags().Centre().Border()); + m_sizerText->Add(label, wxSizerFlags().Border(wxTOP|wxDOWN)); m_sizerText->AddSpacer(wxSizerFlags::GetDefaultBorder()); AddText(info.GetDescription()); @@ -206,7 +206,7 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info, wxWindow* paren if ( icon.IsOk() ) { sizerIconAndText->Add(new wxStaticBitmap(this, wxID_ANY, icon), - wxSizerFlags().Border(wxRIGHT)); + wxSizerFlags().DoubleBorder(wxRIGHT)); // Add a border to the right of the text to make the layout slightly // more symmetrical. @@ -249,7 +249,7 @@ void wxGenericAboutDialog::AddControl(wxWindow *win, const wxSizerFlags& flags) void wxGenericAboutDialog::AddControl(wxWindow *win) { - AddControl(win, wxSizerFlags().Border(wxDOWN).Centre()); + AddControl(win, wxSizerFlags().Border(wxDOWN)); } wxStaticText* wxGenericAboutDialog::AddText(const wxString& text) @@ -257,9 +257,7 @@ wxStaticText* wxGenericAboutDialog::AddText(const wxString& text) if ( text.empty() ) return nullptr; - auto *win = new wxStaticText(this, wxID_ANY, text, - wxDefaultPosition, wxDefaultSize, - wxALIGN_CENTRE); + auto *win = new wxStaticText(this, wxID_ANY, text); AddControl(win); return win;