1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 02:39:23 +02:00

fixed selection by finger (starts under finger, not a line above)

This commit is contained in:
Nikolay Pultsin 2015-04-22 02:53:11 +01:00
parent 7ec36c9a86
commit 3124079b30
2 changed files with 5 additions and 2 deletions

View file

@ -4,6 +4,9 @@
* (planned) Fixed authors list/tags list editing * (planned) Fixed authors list/tags list editing
* (planned) CSS selectors priority * (planned) CSS selectors priority
===== 2.4 beta 3 (Apr ??, 2015) =====
* Fixed long-tap finger selection (word under finger is selected, not a word in the line above)
===== 2.4 beta 2 (Apr 22, 2015) ===== ===== 2.4 beta 2 (Apr 22, 2015) =====
* Footnotes toasts (uses SuperToasts library) * Footnotes toasts (uses SuperToasts library)

View file

@ -328,7 +328,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
} }
protected void moveSelectionCursorTo(ZLTextSelectionCursor cursor, int x, int y) { protected void moveSelectionCursorTo(ZLTextSelectionCursor cursor, int x, int y) {
y -= ZLTextSelectionCursor.getHeight() / 2 + ZLTextSelectionCursor.getAccent() / 2; y -= getTextStyleCollection().getBaseStyle().getFontSize() / 2;
mySelection.setCursorInMovement(cursor, x, y); mySelection.setCursorInMovement(cursor, x, y);
mySelection.expandTo(myCurrentPage, x, y); mySelection.expandTo(myCurrentPage, x, y);
Application.getViewWidget().reset(); Application.getViewWidget().reset();
@ -1762,7 +1762,7 @@ public abstract class ZLTextView extends ZLTextViewBase {
} }
protected boolean initSelection(int x, int y) { protected boolean initSelection(int x, int y) {
y -= ZLTextSelectionCursor.getHeight() / 2 + ZLTextSelectionCursor.getAccent() / 2; y -= getTextStyleCollection().getBaseStyle().getFontSize() / 2;
if (!mySelection.start(x, y)) { if (!mySelection.start(x, y)) {
return false; return false;
} }