X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce00f59b5b169752d2f05ce3bb1a88ddc1b38b4c..8a31648287be0ef976f133de2786b137f1e98340:/src/stc/PlatWX.cpp diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 43c70db215..f2c6302917 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -545,7 +545,7 @@ void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, int *positio #else // If not unicode then just use the widths we have -#if wxUSE_STL +#if wxUSE_STD_CONTAINERS std::copy(tpos.begin(), tpos.end(), positions); #else memcpy(positions, tpos.begin(), len * sizeof(int)); @@ -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(); }