X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5276b0a53cef4815230e39b54d2ecda14f72cbd1..4a699e3a59b19c21b6faae714b56cac5a75df2e2:/src/stc/PlatWX.cpp diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 8f4abde6bd..917e4ea467 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -385,7 +385,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, dc.DrawRoundedRectangle(wxRectFromPRectangle(rc), cornerSize); return; #else - + #ifdef wxHAS_RAW_BITMAP // TODO: do something with cornerSize @@ -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(); } @@ -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();