Skip to content

Commit

Permalink
page numbering in 2-column mode; end-of-section rpocessing in 2-colum…
Browse files Browse the repository at this point in the history
…n mode (in progress)
  • Loading branch information
geometer committed Apr 28, 2013
1 parent e190bfc commit 669bb2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TODO.2pages
@@ -1,9 +1,9 @@
* FIRST RELEASE
** fix end-of-section processing
** backward scrolling

* OPTIONAL
** 3d animation
** "half page turning"
** footer/header
** page delimiter
** page numbering
8 changes: 6 additions & 2 deletions src/org/geometerplus/zlibrary/text/view/ZLTextView.java
Expand Up @@ -557,7 +557,7 @@ private int sizeOfTextBeforeCursor(ZLTextWordCursor wordCursor) {
private synchronized float computeCharsPerPage() {
setTextStyle(ZLTextStyleCollection.Instance().getBaseStyle());

final int textWidth = getTextAreaWidth();
final int textWidth = getTextColumnWidth();
final int textHeight = getTextAreaHeight();

final int num = myModel.getParagraphsNumber();
Expand Down Expand Up @@ -880,7 +880,11 @@ private void buildInfos(ZLTextPage page, ZLTextWordCursor start, ZLTextWordCurso
}
}
}
} while (result.isEndOfParagraph() && result.nextParagraph() && !result.getParagraphCursor().isEndOfSection() && textAreaHeight >= 0);
} while (result.isEndOfParagraph() && result.nextParagraph() && textAreaHeight >= 0 &&
(!result.getParagraphCursor().isEndOfSection() ||
(page.twoColumnView() && page.LineInfos.size() == page.Column0Height)
)
);
resetTextStyle();
}

Expand Down

0 comments on commit 669bb2f

Please sign in to comment.