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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user