Merge branch 'im/osx_fixes' of https://github.com/imciner2/wxWidgets
wxOSX fixes for wxGrid background, wxDataViewCtrl with wx[HV]SCROLL styles and changing the window level. See https://github.com/wxWidgets/wxWidgets/pull/1717
This commit is contained in:
@@ -6176,15 +6176,9 @@ void wxGrid::DrawCell( wxDC& dc, const wxGridCellCoords& coords )
|
||||
// Note: However, only if it is really _shown_, i.e. not hidden!
|
||||
if ( isCurrent && IsCellEditControlShown() )
|
||||
{
|
||||
// NB: this "#if..." is temporary and fixes a problem where the
|
||||
// edit control is erased by this code after being rendered.
|
||||
// On wxMac (QD build only), the cell editor is a wxTextCntl and is rendered
|
||||
// implicitly, causing this out-of order render.
|
||||
#if !defined(__WXMAC__)
|
||||
wxGridCellEditor *editor = attr->GetEditor(this, row, col);
|
||||
editor->PaintBackground(dc, rect, *attr);
|
||||
editor->DecRef();
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -940,10 +940,14 @@ void wxNonOwnedWindowCocoaImpl::SetWindowStyleFlag( long style )
|
||||
else if (( style & wxFRAME_FLOAT_ON_PARENT ) || ( style & wxFRAME_TOOL_WINDOW ))
|
||||
level = NSFloatingWindowLevel;
|
||||
|
||||
// Only update the level when it has changed, setting a level can cause the OS to reorder the windows in the level
|
||||
if ( level != m_macWindowLevel )
|
||||
{
|
||||
[m_macWindow setLevel: level];
|
||||
m_macWindowLevel = level;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool wxNonOwnedWindowCocoaImpl::SetBackgroundStyle(wxBackgroundStyle style)
|
||||
{
|
||||
|
@@ -365,6 +365,10 @@ bool wxDataViewCtrl::Create(wxWindow *parent,
|
||||
const wxValidator& validator,
|
||||
const wxString& name)
|
||||
{
|
||||
// Remove wxVSCROLL and wxHSCROLL from the style, since the dataview panel has scrollbars
|
||||
// by default, and wxControl::Create trys to make some but crashes in the process
|
||||
style &= ~(wxVSCROLL | wxHSCROLL);
|
||||
|
||||
DontCreatePeer();
|
||||
if (!(wxControl::Create(parent,id,pos,size,style,validator,name)))
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user