2
0
mirror of https://github.com/koreader/koreader synced 2024-11-16 06:12:56 +00:00
Commit Graph

56 Commits

Author SHA1 Message Date
Qingping Hou
c8f87d5661 fix: remove page number checking in displaying TOC
Former showTOC() method checks the page number in each
entry and only display entry whose page number is greater
than the previous one. However, I think this is too
"clever", we should better leave the TOC untouched to keep
consistent with other pdf readers.
2012-03-16 12:27:27 +08:00
Qingping Hou
56a00d79a0 mod: delete debug print 2012-03-13 17:16:05 +08:00
Qingping Hou
46cfd950c7 fix: typo 2012-03-13 17:07:55 +08:00
Qingping Hou
8c31dd3c5f fix: hanlde offset in ZOOM_FIT_TO_WIDTH_PAN mode
ZOOM_FIT_TO_WIDTH_PAN mode must be handled differently.
Because not like other zoom mode, its offset is not set
to middle of the screen or page.
2012-03-13 16:21:16 +08:00
Qingping Hou
734f94da89 fix: handle positive self.offset in draworcache method 2012-03-13 15:37:45 +08:00
HW
8410ac5cb7 fix forgotten corner case when caching 2012-03-13 00:11:31 +01:00
HW
aab05c3002 Fix page caching
Fixed page caching. Cache strategy is the following:
prio 1: cache/render requested area
prio 2: cache/render as much of the current page as possible
prio 3: cache/render full page
prio 4: render next page

This is still a bit buggy when in fit-to-content mode.
2012-03-13 00:02:49 +01:00
HW
86ff74acd6 prepare for more elaborate caching policy
we allow for bigger render buffers, so the cache now returns
the ID (hash) of the relevant cashed tile PLUS offsets into that
tile, pointing to the coordinates where the requested frame
has its origin.
2012-03-12 20:48:46 +01:00
Qingping Hou
0e914c5fda revert 70b7e029d3 again
commit 5fae18298a mistakenly
reverted d8a58e8764, in which
commit 70b7e029d3 was reverted.
2012-03-12 19:48:24 +08:00
Qingping Hou
5fae18298a add: goto input box in reader 2012-03-12 13:59:19 +08:00
Dobrica Pavlinusic
d8a58e8764 revert 70b7e029d3
It's not that simple since ZOOM_FIT_TO_CONTENT_HALF_WIDTH also
needs bounding boxes, and this seems like over-optimization
which seems to be bug infested especially because it deals
with negative numbers so code just *looks* wrong
2012-03-12 00:42:44 +01:00
Dobrica Pavlinusic
7ee77dee5c removed duplicate code 2012-03-11 02:20:44 +01:00
Qingping Hou
7389255503 fix: handle last section in getTOCTitleByPage() 2012-03-10 18:20:03 +08:00
Qingping Hou
f95231d789 add: status bar in reading menu & font.lua
* Since fontchooser is replaced by selectmenu, it
is no longer needed. So I rewrite it into font.lua
module which can cache faces that shared among all
UIs.

* add progressBar method in graphics.lua to draw
reading progress.

* add reading progress information in reading menu.
It is just a demo. Should be clean up in next release
when the real reading menu is out. :)
2012-03-10 16:41:23 +08:00
Qingping Hou
319826c385 mod: screen rotation implemented by ioctl
Now you get a instance rotate :) With only one bug.
I have to restore to previous rotation state of the
native system after exists. Because the native system
does poll the new rotation state that changed by ioctl.

Currently, I don't know how to force the native system
to detect the changes.
2012-03-09 18:34:56 +08:00
Qingping Hou
f795bda6e0 mod: read cache settings from .reader.kpdfview.lua 2012-03-09 14:06:05 +08:00
Qingping Hou
70b7e029d3 mod: only get usedBBox in fit to content mode
make fit to page mode a little bit faster
2012-03-09 10:41:31 +08:00
Qingping Hou
d2aaf15dce add: screen.lua
* move rotation mode to global variable, now check rotation
with Screen.cur_rotation_mode

* move screenRotate to screen module so other UIs can use it.
2012-03-09 09:40:46 +08:00
Qingping Hou
3dbf9877bc add: 90 degree rotation support
demo for issue #51
2012-03-08 23:28:16 +08:00
Qingping Hou
3474e56d30 fix: check key mode properly for manual crop 2012-03-08 10:35:33 +08:00
Dobrica Pavlinusic
4bc0bca413 store globalzoom and globalzoommode settings 2012-03-08 01:29:17 +01:00
Dobrica Pavlinusic
4d7fa2d12f Alt+Z to toggle bbox cropping 2012-03-08 00:55:12 +01:00
Dobrica Pavlinusic
c2f2e617ad correct bbox loading and Shift+Z removes page bbox
this moves #35 a *little* bit closer to release ;-)
2012-03-08 00:38:34 +01:00
Dobrica Pavlinusic
9575d23f63 save bbox layout
inspired by f79ae48de8
2012-03-08 00:18:58 +01:00
Dobrica Pavlinusic
0c7eb32d48 Merge branch 'master' into 35_manual_crop 2012-03-08 00:12:21 +01:00
Dobrica Pavlinusic
fdca464b96 don't pre-cache next page if we are going to modify bbox 2012-03-08 00:11:30 +01:00
Dobrica Pavlinusic
f62a12a629 more debugging output for secting bboxes 2012-03-07 18:50:16 +01:00
Qingping Hou
bf267ef0ef mod: add ZOOM_FIT_TO_CONTENT_WIDTH_PAN mode
This mode is used with ZOOM_FIT_TO_CONTENT_WIDTH, so
when press KEY_PGFWD, you jump to lower part of current
page. When hit page bottom, you do a real page turn. It
now behaviors the same like the native reader as I
mentioned in issue #41.

The first time you set to ZOOM_FIT_TO_CONTENT_WIDTH mode,
the reader will setup proper zoom factor and offset, then
switch to ZOOM_FIT_TO_CONTENT_WIDTH_PAN mode. When you hit
the page bottom, the reader will set the mode back to
ZOOM_FIT_TO_CONTENT_WIDTH mode and do a real page turn.
2012-03-07 21:44:59 +08:00
Qingping Hou
f79ae48de8 add: UniReader:initGlobalSettings()
Use this method to read settings that may shared
among all readers. For instance, pan_overlap_vertical
2012-03-07 18:16:46 +08:00
Qingping Hou
68b94fa337 mod: code clean up for KEY_2 to KEY_9 bindings
inspired by commit:
796b42cc36
2012-03-07 17:57:27 +08:00
Qingping Hou
2ca5f2302c fix: set offset to top in unireader
set offset to top even usedbox is larger than
or equal to pagesize.
2012-03-07 11:59:32 +08:00
Qingping Hou
dce80b7b1c mod: change default offset in fit_page_width/height mode
set to the top of page
2012-03-07 07:59:03 +08:00
Qingping Hou
20474ce411 fix: page number in fast jump in percent
use math.floor to convert page number to integer
2012-03-07 07:37:45 +08:00
Dobrica Pavlinusic
b65973990a Merge branch 'master' of github.com:hwhw/kindlepdfviewer 2012-03-07 00:27:35 +01:00
{Qingping,Dave} Hou
d754cff50b Merge pull request #42 from traycold/master
Keyboard shortcuts to jump to 0%, 10%, 20%, .. , 100% of currently reading document.
2012-03-06 15:27:05 -08:00
Dobrica Pavlinusic
5de2fb1a53 implement separate odd/even bboxes 2012-03-07 00:26:56 +01:00
traycold
41e9b216cc Shortcut to jump to page corresponding to 0%, 10%, 20%, .., 100%
of document using respectively key 1, 2, .., 9, 0.
2012-03-06 23:46:10 +01:00
Dobrica Pavlinusic
24ca5854c5 override getUsedBBox for cropping #35 2012-03-06 23:18:52 +01:00
traycold
01399292db Merge remote-tracking branch 'hwhw/master' 2012-03-06 22:14:12 +01:00
Dobrica Pavlinusic
73ec285957 switch to ZOOM_BY_VALUE to enable panning on fiveway move 2012-03-06 21:31:58 +01:00
HW
a30e92b7a4 Merge pull request #36 from traycold/master
some small bugfix and some improvements (filechooser, "single file mode")
2012-03-05 15:16:53 -08:00
traycold
5caad18fb7 Merge remote-tracking branch 'hwhw/master' 2012-03-06 00:12:59 +01:00
traycold
eba1c2d5ef Merge remote-tracking branch 'hwhw/master' into djvu 2012-03-05 23:36:58 +01:00
Dobrica Pavlinusic
061f318132 HOME - filechooser, Shift/Alt+Home - exits closes #34
This seems more logical to me, because accidental exit is really
bad and requires several keypresses and wait for reader to start again.
2012-03-05 20:02:41 +01:00
Dobrica Pavlinusic
bf53b02bd4 new two-colum zoom mode (shift+F) without margins
This is especially useful if you want PDF pages which bouding box
includes headers or footers which are full page width files like #25

I opted to ignore margins with Shift+F to be consistant with other zoom
modes.
2012-03-05 14:17:14 +01:00
Dobrica Pavlinusic
b1ffb5af7e cleanup two column panning
It's important for us to take maring into account because rouding error
can force us to skip right marging. However, this shouldn't be done
when not in pan_by_page mode, so this diff is artifically large
2012-03-05 14:05:26 +01:00
Qingping Hou
f50e8d695c mod: add UniReader:cleanUpTOCTitle()
re-apply the changes introduced by HW in commit:
3c56f50cae

I mistakenly overwrote it when merging from djvu
branch. :(

Since the title needs to be cleaned in two places,
I turn it into a method.
2012-03-05 13:47:02 +08:00
Qingping Hou
989e915c8f mod: add notes in jumpstack
NOTE that the jumpstack maintaining strategy has
been changed in this commit compared to commit #15
and #31. Now current viewing page in kept in the
stack to preserve the notes.
2012-03-05 13:15:34 +08:00
Qingping Hou
ca3a712521 fix: bug in jump stack
* remove page to jump from the stack
2012-03-05 11:25:51 +08:00
Qingping Hou
ab2cd3ec8c mod: save jump_stack after exit 2012-03-05 10:48:03 +08:00