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.
This commit is contained in:
taler21
2022-05-21 00:11:06 +01:00
committed by Vadim Zeitlin
parent 4d3bb036f9
commit 1e483f9510

View File

@@ -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