mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 08:34:38 +03:00
Text alignment has been fixed
This commit is contained in:
parent
5597089985
commit
1fcaa8121c
@ -101,11 +101,11 @@ void TextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* style, Q
|
|||||||
case Angle90:
|
case Angle90:
|
||||||
hOffset = width()-fakeMarginSize();
|
hOffset = width()-fakeMarginSize();
|
||||||
vOffset = fakeMarginSize();
|
vOffset = fakeMarginSize();
|
||||||
if ((tmpSize.width()>0) && (m_alignment & Qt::AlignVCenter)){
|
if (m_alignment & Qt::AlignVCenter){
|
||||||
hOffset = (width()-m_text->size().height())/2+m_text->size().height();
|
hOffset = (width()-m_text->size().height())/2+m_text->size().height();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tmpSize.height()>0) && (m_alignment & Qt::AlignBottom)){
|
if (m_alignment & Qt::AlignBottom){
|
||||||
hOffset = (m_text->size().height());
|
hOffset = (m_text->size().height());
|
||||||
}
|
}
|
||||||
painter->translate(hOffset,vOffset);
|
painter->translate(hOffset,vOffset);
|
||||||
@ -126,11 +126,11 @@ void TextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* style, Q
|
|||||||
case Angle270:
|
case Angle270:
|
||||||
hOffset = fakeMarginSize();
|
hOffset = fakeMarginSize();
|
||||||
vOffset = height()-fakeMarginSize();
|
vOffset = height()-fakeMarginSize();
|
||||||
if ((tmpSize.width()>0) && (m_alignment & Qt::AlignVCenter)){
|
if (m_alignment & Qt::AlignVCenter){
|
||||||
hOffset = (width()-m_text->size().height())/2;
|
hOffset = (width()-m_text->size().height())/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tmpSize.height()>0) && (m_alignment & Qt::AlignBottom)){
|
if (m_alignment & Qt::AlignBottom){
|
||||||
hOffset = (width()-m_text->size().height());
|
hOffset = (width()-m_text->size().height());
|
||||||
}
|
}
|
||||||
painter->translate(hOffset,vOffset);
|
painter->translate(hOffset,vOffset);
|
||||||
|
Loading…
Reference in New Issue
Block a user