Fix the alignment used by custom wxDVC renderers in wxGTK by default.

Correctly initialize the alignment used by the text renderer used by
wxDataViewCustomRenderer in wxGTK implementation of wxDataViewCtrl.

Closes #12298.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-21 13:50:22 +00:00
parent ff7bc95e6f
commit 3e81bbbf6c
3 changed files with 20 additions and 7 deletions

View File

@@ -52,7 +52,7 @@ public:
GtkCellRenderer* GetGtkHandle() { return m_renderer; }
void GtkInitHandlers();
void GtkUpdateAlignment();
void GtkUpdateAlignment() { GtkApplyAlignment(m_renderer); }
// should be overridden to return true if the renderer supports properties
// corresponding to wxDataViewItemAttr field, see wxGtkTreeCellDataFunc()
@@ -85,6 +85,9 @@ protected:
const wxDataViewItem& item,
unsigned col);
// Apply our effective alignment (i.e. m_alignment if specified or the
// associated column alignment by default) to the given renderer.
void GtkApplyAlignment(GtkCellRenderer *renderer);
GtkCellRenderer *m_renderer;
int m_alignment;