From eb5928a5ba2f762e853bfdee426e0e17732b7c08 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Sat, 4 Jul 2015 00:32:15 +0300 Subject: [PATCH] Only apply first line indent to left-aligned and justified layouts --- .../zlibrary/text/src/area/ZLTextArea_processTextLine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fbreader/fbreader/zlibrary/text/src/area/ZLTextArea_processTextLine.cpp b/fbreader/fbreader/zlibrary/text/src/area/ZLTextArea_processTextLine.cpp index 5aa77d2..a9e04b7 100644 --- a/fbreader/fbreader/zlibrary/text/src/area/ZLTextArea_processTextLine.cpp +++ b/fbreader/fbreader/zlibrary/text/src/area/ZLTextArea_processTextLine.cpp @@ -124,7 +124,10 @@ ZLTextLineInfoPtr ZLTextArea::processTextLine(Style &style, const ZLTextWordCurs const ZLTextStyleEntry::Metrics metrics(fontSize, fontSize / 2, width(), height()); info.StartIndent = style.textStyle()->lineStartIndent(metrics, isRtl()); if (isFirstLine) { - info.StartIndent += style.textStyle()->firstLineIndentDelta(metrics); + const ZLTextAlignmentType align = style.textStyle()->alignment(); + if (align == ALIGN_LEFT || align == ALIGN_JUSTIFY) { + info.StartIndent += style.textStyle()->firstLineIndentDelta(metrics); + } } if (!info.NodeInfo.isNull()) { info.StartIndent += (context().stringHeight() + 2) / 3 * 4 * (info.NodeInfo->VerticalLinesStack.size() + 1);