Implement background color attribute for wxDataViewCtrl in wxOSX
Add support for this attribute for text-like cells to the native macOS version too, to bring it up to parity with the generic and GTK ones. Closes https://github.com/wxWidgets/wxWidgets/pull/1673
This commit is contained in:
committed by
Vadim Zeitlin
parent
c4af8be615
commit
540fed9216
@@ -142,6 +142,7 @@ public:
|
||||
|
||||
[m_origFont release];
|
||||
[m_origTextColour release];
|
||||
[m_origBackgroundColour release];
|
||||
}
|
||||
|
||||
NSCell* GetColumnCell() const { return m_ColumnCell; }
|
||||
@@ -186,6 +187,7 @@ public:
|
||||
// ones that do.
|
||||
NSFont *GetOriginalFont() const { return m_origFont; }
|
||||
NSColor *GetOriginalTextColour() const { return m_origTextColour; }
|
||||
NSColor *GetOriginalBackgroundColour() const { return m_origBackgroundColour; }
|
||||
|
||||
void SaveOriginalFont(NSFont *font)
|
||||
{
|
||||
@@ -197,6 +199,11 @@ public:
|
||||
m_origTextColour = [textColour retain];
|
||||
}
|
||||
|
||||
void SaveOriginalBackgroundColour(NSColor *backgroundColour)
|
||||
{
|
||||
m_origBackgroundColour = [backgroundColour retain];
|
||||
}
|
||||
|
||||
// The ellipsization mode which we need to set for each cell being rendered.
|
||||
void SetEllipsizeMode(wxEllipsizeMode mode) { m_ellipsizeMode = mode; }
|
||||
wxEllipsizeMode GetEllipsizeMode() const { return m_ellipsizeMode; }
|
||||
@@ -226,6 +233,7 @@ private:
|
||||
// we own those if they're non-NULL
|
||||
NSFont *m_origFont;
|
||||
NSColor *m_origTextColour;
|
||||
NSColor *m_origBackgroundColour;
|
||||
|
||||
wxEllipsizeMode m_ellipsizeMode;
|
||||
|
||||
|
Reference in New Issue
Block a user