From: Robin Dunn Date: Tue, 8 Nov 2011 17:39:38 +0000 (+0000) Subject: Add a border on the AutoComp list for wxOSX-Cocoa X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/56c1c2990459bb5f2c2b0fbd8967699134a57b20 Add a border on the AutoComp list for wxOSX-Cocoa git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index c92a71592d..f2c6302917 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -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(); }