Account for text attrs in generic wxDataViewCtrl's renderers.
When determining cell content's size, GetSize() measured the text using wxDataViewCtrl's font, even though it could be renderer in bold or italics. Corrected by setting the attributes - and not only the value - prior to GetSize() calls, and by using the right font in GetTextExtent() calls. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -267,6 +267,10 @@ public:
|
||||
// Prepare DC to use attributes and call Render().
|
||||
void WXCallRender(wxRect rect, wxDC *dc, int state);
|
||||
|
||||
protected:
|
||||
// helper for GetSize() implementations, respects attributes
|
||||
wxSize GetTextExtent(const wxString& str) const;
|
||||
|
||||
private:
|
||||
wxDataViewItemAttr m_attr;
|
||||
|
||||
|
Reference in New Issue
Block a user