Only apply first line indent to left-aligned and justified layouts
This commit is contained in:
parent
b704fb1289
commit
eb5928a5ba
1 changed files with 4 additions and 1 deletions
|
@ -124,8 +124,11 @@ ZLTextLineInfoPtr ZLTextArea::processTextLine(Style &style, const ZLTextWordCurs
|
||||||
const ZLTextStyleEntry::Metrics metrics(fontSize, fontSize / 2, width(), height());
|
const ZLTextStyleEntry::Metrics metrics(fontSize, fontSize / 2, width(), height());
|
||||||
info.StartIndent = style.textStyle()->lineStartIndent(metrics, isRtl());
|
info.StartIndent = style.textStyle()->lineStartIndent(metrics, isRtl());
|
||||||
if (isFirstLine) {
|
if (isFirstLine) {
|
||||||
|
const ZLTextAlignmentType align = style.textStyle()->alignment();
|
||||||
|
if (align == ALIGN_LEFT || align == ALIGN_JUSTIFY) {
|
||||||
info.StartIndent += style.textStyle()->firstLineIndentDelta(metrics);
|
info.StartIndent += style.textStyle()->firstLineIndentDelta(metrics);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!info.NodeInfo.isNull()) {
|
if (!info.NodeInfo.isNull()) {
|
||||||
info.StartIndent += (context().stringHeight() + 2) / 3 * 4 * (info.NodeInfo->VerticalLinesStack.size() + 1);
|
info.StartIndent += (context().stringHeight() + 2) / 3 * 4 * (info.NodeInfo->VerticalLinesStack.size() + 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue