]> git.saurik.com Git - wxWidgets.git/commitdiff
Add a border on the AutoComp list for wxOSX-Cocoa
authorRobin Dunn <robin@alldunn.com>
Tue, 8 Nov 2011 17:39:38 +0000 (17:39 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 8 Nov 2011 17:39:38 +0000 (17:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/stc/PlatWX.cpp

index c92a71592d42a7113aa65d7a3e2ebbb6f83a2583..f2c63029171942771696385e20c9cb535660fc4f 100644 (file)
@@ -849,6 +849,9 @@ public:
         lv->Reparent(this);
 #ifdef __WXMSW__
         lv->Show();
+#endif
+#ifdef __WXOSX_COCOA__
+        SetBackgroundColour(wxColour(0xC0, 0xC0, 0xC0));
 #endif
     }
 
@@ -908,10 +911,20 @@ public:
     void OnSize(wxSizeEvent& event) {
         // resize the child to fill the popup
         wxSize sz = GetClientSize();
-        lv->SetSize(0, 0, sz.x, sz.y);
+        int x, y, w, h;
+        x = y = 0;
+        w = sz.x;
+        h = sz.y;
+#ifdef __WXOSX_COCOA__
+        // make room for the parent's bg color to show, to act as a border
+        x = y = 1;
+        w -= 2;
+        h -= 2;
+#endif
+        lv->SetSize(x, y, w, h);
         // reset the column widths
         lv->SetColumnWidth(0, IconWidth()+4);
-        lv->SetColumnWidth(1, sz.x - 2 - lv->GetColumnWidth(0) -
+        lv->SetColumnWidth(1, w - 2 - lv->GetColumnWidth(0) -
                            wxSystemSettings::GetMetric(wxSYS_VSCROLL_X));
         event.Skip();
     }