X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ddda15ba50407de79f9749ab840d8c9ba0dde39..3b9ba64cce90f096763d70915fd459bfdf6a57d3:/src/common/datavcmn.cpp diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index af4987ae39..38abe9c159 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -797,8 +797,17 @@ wxDataViewCustomRendererBase::RenderText(const wxString& text, ); } + // get the alignment to use + int align = GetAlignment(); + if ( align == wxDVR_DEFAULT_ALIGNMENT ) + { + // if we don't have an explicit alignment ourselves, use that of the + // column in horizontal direction and default vertical alignment + align = GetOwner()->GetAlignment() | wxALIGN_CENTRE_VERTICAL; + } + dc->DrawLabel(ellipsizedText.empty() ? text : ellipsizedText, - rectText, GetAlignment()); + rectText, align); } //-----------------------------------------------------------------------------