From 1e483f9510889bb2c6d000dc4b63e65483633fef Mon Sep 17 00:00:00 2001 From: taler21 Date: Sat, 21 May 2022 00:11:06 +0100 Subject: [PATCH] Improve the appearance of "Close" button in wxPreviewFrame Ensure that there is a border at least as wide as between the other button groups before this button. --- src/common/prntbase.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 43c91a5504..e72963a49f 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -1528,9 +1528,13 @@ public: // as everything else added after it will be added on the right side too. void AddAtEnd(wxWindow *win) { + // Ensure there is at least the same gap before the final button as + // between the other groups. + m_sizer->AddSpacer(wxRound(2*wxSizerFlags::GetDefaultBorderFractional())); + m_sizer->AddStretchSpacer(); m_sizer->Add(win, - wxSizerFlags().Border(wxTOP | wxBOTTOM | wxRIGHT).Center()); + wxSizerFlags().Border().Center()); } // Indicates the end of a group of buttons, a separator will be added after