]> git.saurik.com Git - wxWidgets.git/commitdiff
fix visual artifact in wxMSW (why does it happen?)
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 15 Feb 2002 19:42:12 +0000 (19:42 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 15 Feb 2002 19:42:12 +0000 (19:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/gizmos/editlbox.cpp

index 4617028570da4cca1b61cafd301dab93b782759c..5e91e34e96c2d8dd2c2e0884f3a0135d9bdac82d 100644 (file)
@@ -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);