From 45a4db125e19d731629af91d4b138096442e9ccb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 30 Sep 2019 23:31:18 +0200 Subject: [PATCH] Add right margin around wxGenericCollapsiblePane header too This makes the collapsible pane allocated exactly its best size better looking, as the header is centered now, instead of having a border on the left side, but not on the right one. See #18515. --- src/generic/collpaneg.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/generic/collpaneg.cpp b/src/generic/collpaneg.cpp index 37f8f90f22..5c570df37a 100644 --- a/src/generic/collpaneg.cpp +++ b/src/generic/collpaneg.cpp @@ -84,8 +84,7 @@ bool wxGenericCollapsiblePane::Create(wxWindow *parent, m_pButton = new wxCollapsibleHeaderCtrl(this, wxID_ANY, label, wxPoint(0, 0), wxDefaultSize); - // on other platforms we put the static line and the button horizontally - m_sz->Add(m_pButton, 0, wxLEFT|wxTOP|wxBOTTOM, GetBorder()); + m_sz->Add(m_pButton, wxSizerFlags().Border(wxALL, GetBorder())); // FIXME: at least under wxGTK1 the background is black if we don't do // this, no idea why...