Implement wxDataViewCtrl::SetFont() on OS X
wxDataViewCtrl now behaves consistently with other ports on OS X: calling SetFont() sets the default font used by renderers and adjusts row height to fit.
This commit is contained in:
@@ -204,6 +204,10 @@ public:
|
||||
// Set the line break mode for the given cell using our m_ellipsizeMode
|
||||
void ApplyLineBreakMode(NSCell *cell);
|
||||
|
||||
// Does the rendered use a font that the control can't override?
|
||||
void SetHasCustomFont(bool has) { m_hasCustomFont = has; }
|
||||
bool HasCustomFont() const { return m_hasCustomFont; }
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
@@ -224,6 +228,8 @@ private:
|
||||
NSColor *m_origTextColour;
|
||||
|
||||
wxEllipsizeMode m_ellipsizeMode;
|
||||
|
||||
bool m_hasCustomFont;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
@@ -519,6 +525,8 @@ public:
|
||||
// Cocoa-specific helpers
|
||||
id GetItemAtRow(int row) const;
|
||||
|
||||
virtual void SetFont(const wxFont& font, const wxColour& foreground, long windowStyle, bool ignoreBlack = true);
|
||||
|
||||
private:
|
||||
void InitOutlineView(long style);
|
||||
int GetDefaultRowHeight() const;
|
||||
|
Reference in New Issue
Block a user