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:
Václav Slavík
2010-10-30 15:57:49 +00:00
parent d0154e3a5a
commit 86755098f5
4 changed files with 83 additions and 31 deletions

View File

@@ -172,6 +172,9 @@ public:
bool IsDefault() const { return !(HasColour() || HasFont()); }
// Return the font based on the given one with this attribute applied to it.
wxFont GetEffectiveFont(const wxFont& font) const;
private:
wxColour m_colour;
bool m_bold;