2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

297 Commits

Author SHA1 Message Date
Tigran Aivazian
cd48bc4d8b Add dim_overlap configurable
On request of users (dracodoc, kai771 et al.) I have added a new command
`O` which toggles the display (via dimmed box) of the page overlap
areas. This setting is saved on a per-book basis, i.e. is specific to
the book, which is the desired behaviour as one wants dimming on some
books (math, physics, etc) but not others (fiction).
2012-10-08 12:48:01 +01:00
Dobrica Pavlinušić
5608759e0f Merge pull request #393 from tigran123/bookmark-refresh
No need for page redraw in UniReader:addBookmark()
2012-10-08 04:08:00 -07:00
Tigran Aivazian
e06069c147 Comment out a Debug() for page jumping.
All those functions get called even if Debug() itself is a do-nothing,
so this type of Debug()s should only be uncommented when needed.
2012-10-08 11:13:59 +01:00
Tigran Aivazian
a63140e9c8 Add "manual full screen refresh" on pressing Space
Overloading the function "set full screen refresh count" (Shift-R) with
forcing screen refresh is rather counter-intuitive and inconvenient in
practice, because the InputBox dialog obscures the large part of the
page and when it disappears it is not obvious whether the full page
redraw occurred or not.
Therefore, it is more convenient to have a separate function (bound to
KEY_SPACE as in KPV's filemanager, K3Chess and in most other readers)
that does the full screen refresh.
2012-10-08 10:39:40 +01:00
Tigran Aivazian
aeb8bcf729 No need for page redraw in UniReader:addBookmark()
The call to self:redrawCurrentPage() in UniReader:addBookmark() comes
from the days when this function was causing a "Retrieving TOC..."
message via getTocTitleByPage()->fillToc() codepath. Now that message is
gone so we should kill the redraw as well.
2012-10-08 08:50:09 +01:00
Tigran Aivazian
33768b50a7 Explain Shift-R function in the help better
1. Explain the purpose of `Shift-R` function better in the help screen.
2. Show the range of valid values when the user presses `Shift-R`.
2012-10-08 08:31:34 +01:00
Dobrica Pavlinusic
fea2eea7a4 create shortcuts just for visible links 2012-10-07 12:35:49 +02:00
Dobrica Pavlinusic
6ab06cb584 reset screen offsets after pre-cache
Code which tried to restore offsets didn't do anything since old and
self point to same values
2012-10-07 12:35:23 +02:00
Dobrica Pavlinušić
1ced4ceb17 Merge pull request #376 from tigran123/nupogodi-inform
Switch to new InfoMessage API (from NuPogodi).
2012-10-06 11:33:37 -07:00
Tigran Aivazian
e541a378a2 Flush the time/battery info to the right for PDF
Do the same for PDF that I have done for DjVu, to be consistent.
2012-10-06 15:10:46 +01:00
NuPogodi
81cb3a1f25 Switch unireader.lua to new InfoMessage:inform() 2012-10-05 11:10:26 +01:00
Tigran Aivazian
77273a84a7 Decrease the step for gamma to 10%.
The current step of 25% forward and 20% backward is too big and does not
let us come close enough to the design value of 2.2 for most djvu files.
With 10% step we can get much closer.
2012-10-04 22:33:43 +01:00
Tigran Aivazian
a2970bafad Change print() to Debug for "Unknown direction!" message. 2012-10-04 11:54:37 +01:00
Tigran Aivazian
f2443a7d33 Kill "Retrieving TOC..." message and simplify code.
After some consideration I believe that it is best to get rid of
"Retrieving TOC..." message altogether on the following grounds:
1. The code in unireader.lua/crereader.lua that has to deal with this
specifically can be removed.
2. The fillToc() is a data manipulation function and ought not to touch
graphical state.
3. The files for which retrieving TOC can take a long time are
_exceptionally_ rare (only two are known to me --- both are my own
editions with detailed morphological tags which require massive
hierarchical TOC for quick navigation)
4. Users are going to be confused when they press Menu for the first
time and see "Retrieving TOC..." staying on the screen until they press
Menu again.
2012-10-03 23:05:53 +01:00
Tigran Aivazian
fe20d8a899 Tiny optimization of UniReader:goto()
Save the value of self.doc:getPages() in a local variable instead of
calling it twice (the number of pages in a document is not going to
change).
2012-10-03 09:24:30 +01:00
Qingping Hou
f37d6a647f Merge branch 'master' of github.com:hwhw/kindlepdfviewer 2012-10-02 20:43:08 -04:00
Qingping Hou
d2a1033baf set full screen refresh on every page turn 2012-10-02 20:17:36 -04:00
Dobrica Pavlinusic
ccff5c899d show reneding page_indicator only in debug mode
This addresses performance degradation because of two e-ink refreshes
introduced by this feature #349
2012-10-03 00:16:45 +02:00
Dobrica Pavlinusic
6325183dc3 Revert "don't preCache in two column mode"
This reverts commit 4d187aad4e.
2012-10-02 23:22:06 +02:00
Dobrica Pavlinusic
2fc0cb2ddd reset last_globalzoom_mode on setglobalzoom_mode #346 2012-10-01 15:50:15 +02:00
{Qingping,Dave} Hou
69e43d1c4d Merge pull request #343 from dpavlin/preCache
don't preCache in two column mode
2012-09-30 13:26:42 -07:00
Tigran Aivazian
72f669ff3c Don't allow floating point values for rcountmax
This is a better version of the previous commit, which:
a) makes the code more readable
b) disallows rcountmax values like "6.05", i.e. restricts to integers
only.
2012-09-30 18:28:10 +01:00
Tigran Aivazian
79c1dd44ca Restrict the values of rcountmax to the range 0-10
Currently the user can enter any value like -10 and it is accepted and
saved in the settings file(s).
2012-09-30 16:06:55 +01:00
Dobrica Pavlinusic
4d187aad4e don't preCache in two column mode
This also cleanups code to make it easier to follow chaning logic
a bit to generate useful Debug messages
2012-09-30 16:18:16 +02:00
Dobrica Pavlinusic
12e9930975 ZOOM_FIT_TO_CONTENT_WIDTH_PAN pan centers page
When we start panning up in fit to width mode, we shouldn't
center page vertically on screen.
2012-09-30 00:48:06 +02:00
Dobrica Pavlinusic
7b983ee7e6 fix fiveway pan to right-bottom of previous page 2012-09-27 21:29:25 +02:00
Dobrica Pavlinusic
01a57b2fb9 recalculate pan offsets on page change
Store last globalzoom_mode in self.pan_by_page so we can restore it
to force offsets recalculation on page change

This wasn't quite enough to trigger correct re-panning for page
changes when using fiveway to move in two-column mode, issue #275

I considered adding callback to goto method and than transfering
it through function calls, but this approach (allthough very
questionable) seemed to provide simplier code.
2012-09-27 19:21:51 +02:00
{Qingping,Dave} Hou
cc1ab45b1c Merge pull request #329 from dpavlin/fit-content-pan
remember last zoom mode when panning #236
2012-09-26 21:40:23 -07:00
Dobrica Pavlinusic
7ba8d6f877 remember last zoom mode when panning #236
This tries to address issue #236 so that previous and next keys don't
change meaning when user go into panning mode by pressing fiveway.
2012-09-27 00:37:32 +02:00
Tigran Aivazian
a7b22ba0d4 Mixed up unireader.toc with self.toc, sorry. 2012-09-26 19:56:07 +01:00
Tigran Aivazian
5d82ffe984 Redraw current page if necessary on pressing Back
For PDF and DjVu files (but not for crereader) the command handler for
"Back" key can call addJump() in order to avoid losing the top of the
jump history on return. This (addJump()) can cause the TOC to be
retrieved and the message "Retrieving TOC..." to be displayed.
If this happens then we need to redraw the current page after displaying
our own "Already first jump!" message.
2012-09-26 16:05:07 +01:00
Tigran Aivazian
3cdb57ccc7 Merge pull request #309 from dpavlin/pdf-links
show pdf links using L key
2012-09-26 03:03:22 -07:00
Dobrica Pavlinusic
929334c00c shortcut_offset should be added directly to shortcut_map 2012-09-26 11:42:15 +02:00
Dobrica Pavlinusic
51e2a0c13b use shortcut_map to track page links 2012-09-26 10:55:03 +02:00
Dobrica Pavlinusic
771901d56e use all shortcuts, skipping uri links 2012-09-26 10:48:07 +02:00
Dobrica Pavlinusic
d936f86f04 fix shortcuts beyond last one 2012-09-25 21:16:03 +02:00
Dobrica Pavlinusic
88828fd478 check if there is at least one page link before drawing shortcuts 2012-09-25 19:28:16 +02:00
Dobrica Pavlinusic
ee7b0ca41e ignore all non-page links 2012-09-25 19:04:46 +02:00
Dobrica Pavlinusic
fc22f5ed93 check if getPageLinks returned links before use 2012-09-25 18:31:42 +02:00
Dobrica Pavlinusic
16c5171432 removed refresh which will be called after anyway 2012-09-25 15:39:20 +02:00
Dobrica Pavlinusic
01b1f5ba66 move 30 link shortcuts around using fireway 2012-09-25 15:36:13 +02:00
Dobrica Pavlinusic
cc222c6525 fix DOT and SYM bindings, added ENTER 2012-09-25 15:00:58 +02:00
Tigran Aivazian
06a0b27664 Allow clearing both internal and document caches via Menu
Bind the key "C" in Menu to clear internal tile cache and key "D" to
clear the document cache.
2012-09-25 10:55:31 +01:00
NuPogodi
d542982778 remove self:redrawCurrentPage() in UniReader:addJump(pageno) 2012-09-25 02:19:33 +03:00
Dobrica Pavlinusic
ac14ac4a21 show only page links 2012-09-25 00:04:11 +02:00
Dobrica Pavlinusic
8a7f2bd562 go only to page links 2012-09-25 00:03:32 +02:00
Dobrica Pavlinusic
a3f5de9e7a fix size of fonts according to globalzoom
And a few of one pixel up, one pixel down adjustemts, so that all
underlines get dimmed.
2012-09-24 23:57:49 +02:00
Dobrica Pavlinusic
1916f5038b draw links on page as underline 2012-09-24 23:24:10 +02:00
Tigran Aivazian
1e2429b3be Fix for the issue #311.
Children nodes that have no [apparent] parent should be adopted
by the "_HEAD" i.e. the root of the whole tree.
2012-09-24 21:33:47 +01:00
Dobrica Pavlinusic
f2eeca73aa overlay keyboard shortcuts on top of links
This is example of user interface discussed in #309
2012-09-24 20:27:13 +02:00