X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01871bf642aa91f0150285fa71e18151721de8e0..3ae670cd59711e19ed3c65dc7fd7fff102d52b69:/src/stc/PlatWX.cpp diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index c92a71592d..917e4ea467 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(); } @@ -1570,7 +1583,7 @@ wxString stc2wx(const char* str) } -const wxWX2MBbuf wx2stc(const wxString& str) +wxWX2MBbuf wx2stc(const wxString& str) { const wchar_t* wcstr = str.c_str(); size_t wclen = str.length();