Merge branch 'mac-dvc-autosize'

Fixes for wxDVC columns autosizing under Mac.

See https://github.com/wxWidgets/wxWidgets/pull/2305
This commit is contained in:
Vadim Zeitlin
2021-04-08 01:39:21 +02:00
3 changed files with 55 additions and 8 deletions

View File

@@ -86,7 +86,7 @@ class wxCocoaDataViewControl;
class wxDataViewColumnNativeData
{
public:
wxDataViewColumnNativeData() : m_NativeColumnPtr(NULL)
wxDataViewColumnNativeData() : m_NativeColumnPtr(NULL), m_isLast(false), m_prevWidth(0)
{
}
@@ -105,9 +105,32 @@ public:
m_NativeColumnPtr = newNativeColumnPtr;
}
bool GetIsLast() const
{
return m_isLast;
}
void SetIsLast(bool isLast)
{
m_isLast = isLast;
}
int GetPrevWidth() const
{
return m_prevWidth;
}
void SetPrevWidth(int prevWidth)
{
m_prevWidth = prevWidth;
}
private:
// not owned by us
NSTableColumn* m_NativeColumnPtr;
bool m_isLast;
int m_prevWidth;
};
// ============================================================================