magistr
15-07-2007 13:46:16
I am create very simple label background: rectangle with 1px border
After, I am try to align text:
Vertical: buttom
Horizontal: right
But text does not aligned by buttom line.
All problem in text Height.
I am experiment with labelSize and to come to conclusion:
if incrase labelsize by Y, it works correctly.
(labelSize.y*=0.
Why???
After, I am try to align text:
Vertical: buttom
Horizontal: right
But text does not aligned by buttom line.
All problem in text Height.
I am experiment with labelSize and to come to conclusion:
if incrase labelsize by Y, it works correctly.
(labelSize.y*=0.

void Label::alignText(HorizontalAlignment ha, VerticalAlignment va)
{
mHorizontalAlignment = ha;
mVerticalAlignment = va;
Ogre::Vector2 relativeLabelPos = mTextWidget->getPosition();
Ogre::Vector2 labelPos = mTextWidget->getPosition(QGUI_GMM_ABSOLUTE);
Ogre::Vector2 labelSize = mTextWidget->getSize(QGUI_GMM_ABSOLUTE);
labelSize.y*=0.8;
Why???