From 923d52d6fec91f5f5df281bb1dffaa548cfacf8a Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 15 Feb 2002 19:42:12 +0000 Subject: [PATCH] fix visual artifact in wxMSW (why does it happen?) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/gizmos/editlbox.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/contrib/src/gizmos/editlbox.cpp b/contrib/src/gizmos/editlbox.cpp index 4617028570..5e91e34e96 100644 --- a/contrib/src/gizmos/editlbox.cpp +++ b/contrib/src/gizmos/editlbox.cpp @@ -130,11 +130,20 @@ wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id, m_bDown->SetToolTip(wxT("Move down")); #endif - subsizer->Add(m_bEdit, 0, wxALIGN_CENTRE_VERTICAL); - subsizer->Add(m_bNew, 0, wxALIGN_CENTRE_VERTICAL); - subsizer->Add(m_bDel, 0, wxALIGN_CENTRE_VERTICAL); - subsizer->Add(m_bUp, 0, wxALIGN_CENTRE_VERTICAL); - subsizer->Add(m_bDown, 0, wxALIGN_CENTRE_VERTICAL); +#ifdef __WXMSW__ + #define BTN_BORDER 4 + // FIXME - why is this needed? There's some reason why sunken border is + // ignored by sizers in wxMSW but not in wxGTK that I can't + // figure out... +#else + #define BTN_BORDER 0 +#endif + + subsizer->Add(m_bEdit, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + subsizer->Add(m_bNew, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + subsizer->Add(m_bDel, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + subsizer->Add(m_bUp, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + subsizer->Add(m_bDown, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); subp->SetAutoLayout(TRUE); subp->SetSizer(subsizer); -- 2.45.2