mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 17:59:33 +02:00
fixed page percent computation
This commit is contained in:
parent
570e605fd2
commit
d5d93bfd1b
1 changed files with 2 additions and 1 deletions
|
@ -509,7 +509,8 @@ public final class FBView extends ZLTextView {
|
||||||
}
|
}
|
||||||
if (footerOptions.showProgressAsPercentage() && pagePosition.Total != 0) {
|
if (footerOptions.showProgressAsPercentage() && pagePosition.Total != 0) {
|
||||||
maybeAddSeparator(info, separator);
|
maybeAddSeparator(info, separator);
|
||||||
info.append(String.valueOf((100 * pagePosition.Current + 49) / pagePosition.Total));
|
final int percent = (int)(100f * pagePosition.Current / pagePosition.Total + .5f);
|
||||||
|
info.append(String.valueOf(percent));
|
||||||
info.append("%");
|
info.append("%");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue