Restore the use of correct alignment in wxDVC renderers.
The code from old CalculateAlignment() was somehow lost during the refactoring, restore it in wxDataViewCustomRendererBase::RenderText(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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,
|
dc->DrawLabel(ellipsizedText.empty() ? text : ellipsizedText,
|
||||||
rectText, GetAlignment());
|
rectText, align);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user