Commit Graph

250 Commits (c0981a55d9ff41cea99a32ba8dd53b562ca0d5b0)

Author SHA1 Message Date
ezdiy 5345728cc4
Clean up C blitbuffer kludges. (#6696)
CBB now handles nightmode correctly (by deferring to Lua), so we no longer
need to do monkey dances about disabling it when hw invert is missing.

canUseCBB cap is resolved by generic device re-configuring blitbuffer
on the go, so as to avoid repeating the same thing in every device driver.

The dev setting can now flip cbb on the go, so one can gloat at the near
meaningless perf difference - 2Mp draw is 15ms Lua / 10ms C on 1GHz Cortex A7.
4 years ago
ezdiy 4857e97e30
Pocketbook: Launcher OS integration (#6620)
* Bring in restart koreader & shutdown device exit options
* Existing instance reused for opens via native book explorer
4 years ago
poire-z 69d11ebfd9 Start with: add Favorites 4 years ago
NiLuJe b4d5cfccb7
Fix a few logic holes in dithering mode selection (#6419)
* Allow switching to SW dithering on a HW-capable device without that being lost on boot (and, worse, left in an undithered state).
* Make sure the automagic toggles between HW/SW in the Dev menu are properly saved.
4 years ago
yparitcher 8f2399caa9
[fix] Allow default FM rotation on init when `Keep FM rotation` is disabled (#6348) 4 years ago
NiLuJe aed27a5a16
Warn if color rendering is enabled on a grayscale device. (#5871)
* Make sure the Color menu is accessible on GrayScale device, in the event
one would have inherited a color-enabled settings from another
device...

* Warn on startup if color rendering is enabled on a grayscale device.

A non-exhaustive lists of things such a setup would break:
* same-to-same blitbuffers for pretty much every rendering engine
* same-to-same blitting codepaths and fast-paths
* software dithering in CRe
4 years ago
poire-z 1a7d2dd657 reader.lua: re-order touchScreenProbe() after CanvasContext
Device:touchScreenProbe() may display some widget (on first
install on Kobo Touch), and needs CanvasContext initialized.
Prevent a crash in this case.
4 years ago
poire-z 866c9571df [RTL UI] adds bidi.lua, bootstrap UI mirroring with RTL languages
Set default language (for Harfbuzz to pick up localized glyphs
in a font), default text direction, and UI element mirroring
depending on the UI language.
4 years ago
poire-z 08a5275984 reader.lua: re-order sections in a more logical order
Hardware first, then canvas & fonts, and then the UI widgets
as late as possible.
4 years ago
NiLuJe 1eb442a24a Fix debug logging in the framebuffer module
Regression since 02eca23649
5 years ago
B YI 0a1a407208 [feat] Handle file:// protocol URI scheme (#5297)
This patch only handles part of  file URI scheme defined in [rfc 8089](https://tools.ietf.org/html/rfc8089), i.e., it currently only handles `file://ABSOLUTE_PATH`.
5 years ago
NiLuJe 888d3591b2
Give more control over CRe margins (#4945)
Without having to resort to weird custom defaults.

* Split the current margins setting in three:
  * Horizontal margins (because you generally want those two to be balanced).
  * Top margin & Bottom margin (because you may want to tweak those separately to deal with quirky status bar/final line shenanigans).

* Also, add a "Reclaim bar height from bottom margin" toggle to the status bar menu, to optionally make sure the status bar won't eat into the bottom margin.

* Includes a free fix to diacritics popup refresh handling in the keyboard ;).
5 years ago
Qingping Hou 080c079d01 chore: add test for screen color toggle 5 years ago
NiLuJe 9134594119
Allow toggling CRe's new dithering & scaling (#4922)
Smooth scaling toggle is per document, in the gear tab.
Dithering is in the Dev top menu ;).
5 years ago
NiLuJe 4005bf69aa
Slightly less crappy Nightmode (#4871)
Companion PR to https://github.com/koreader/koreader-base/pull/884
* Basically flags devices known to be stable when using PxP inversion.
* Plus, random fix for #4870 ;).
* A few FrontLight tweaks & cleanups on Kobo:
  * Moved the Kobo-specific startup status insanity to Kobo-specific init
  * Made turnOff/turnOn frontlight do a smooth ramp down/up
  * On Kobo, use turnOff/turnOn for suspend/resume, to get that smooth toggle
  * On Kobo, for NaturalLight w/ a mixer, only set warmth for setWarmth, and only set Brightness for setBrightness, otherwise, it tried to set both with not in-sync values, which made the FL widget jittery.
5 years ago
NiLuJe b72a2000b1
A few minor fixes after #4847 (#4850)
* Add a toggle to disable the C blitter in the Dev menu (depends on https://github.com/koreader/koreader-base/pull/882) (never shown if the JIT is disabled, grayed out if the C blitter is not installed)
* Fix a few sizeUtf8Text call sites that were doing a nil check in order to account for the new return type.
* Tweak statusbar handling to avoid spurious sizeUtf8Text warnings when it's hidden, and unify its behavior between being hidden via toggle, and hidden on book open (at least when all-at-once is not enabled).
* c.f., https://github.com/koreader/koreader-base/pull/882 (Android, PB, RGB32 & Legacy Kindle regression fixes).
5 years ago
Frans de Jonge 644e0d6440
[fix] Behave properly on start with shortcuts (#4772)
Regression caused by #4764. Fixes #4768.
5 years ago
Qingping Hou 4b7d5c82b7 fix: update gesturedector constant for custom screen dpi 5 years ago
Qingping Hou 1605409c60 rename runtimectl to document/canvascontext 5 years ago
Qingping Hou 4d8da96177 fix test 5 years ago
Qingping Hou 855c8c2569 add dummy device & rename runtimectl:setDevice to runtimectl:init 5 years ago
Qingping Hou d749591984 decouple device from pdfdocument, font & bgr checking 5 years ago
Qingping Hou 02eca23649 decouple device from document modules 5 years ago
NiLuJe bb3f49a566 [feat, Kobo] On Kobo, drop fb to 8bpp on startup (#4637)
* The Great 8bpp Experiment

Swap to 8bpp on Kobo, because we're 'effing grayscale, for pete's sake!

* Always swap to 8bpp, no matter the launch method.

Because it turned out that, even when restarting Nickel, we had to
restore the expected bitdepth ourselves, because pickel/Nickel didn't do
the job completely.

(I'm going to guess the grayscale flag wasn't getting flipped properly).

* Dither every non-transparent icon to the eInk palette

* Make sure hasBGRFrameBuffer is only enabled when the Kobo fb actually is
@ 32bpp...

* Re-process badly grayscaled icons

* And re-grayscale that one w/ gamma correction so the squares show up
better.

* Allow the fbdepth switch to be disabled (in Developer settings).

Also, allow setting debug mode that way.

Also, forcibly disable verbose logging when disabling debug.

* Update setting name to piggyback on the existing check in reader.lua

* Update icons postprocessing info
5 years ago
Robert 192bc175fc New startup option: Folder shortcuts (#4220) 6 years ago
Frans de Jonge d0130ae9da
reader.lua: add version to ascii art (#3724)
As suggested by @poire-z in https://github.com/koreader/koreader/pull/3723#issuecomment-370557018
6 years ago
Frans de Jonge ea033431aa CircleCI fixes
* shellcheck 0.4.5 fix `LC_ALL: en_US.UTF8` (can be removed for shellcheck 0.4.6)

* hush updated luacheck on `reader.lua`; we're not assigning any variables but `= nil` is redundant
7 years ago
poire-z 308c243238 Inform once about color rendering on supported devices (#3289) 7 years ago
poire-z d4fd0b9428 frontlight on kobo: a few fixes (#3163)
* frontlight on kobo: a few fixes

Rewritten to not update NickelConf on every change, and never
if KOBO_SYNC_BRIGHTNESS_WITH_NICKEL = false.
Reintroduce global settings frontlight_intensity and
is_frontlight_on to keep level and state across koreader
sessions.
Fix a few of the remaining issues on kobo light.
Ensure settings are saved when rebooting/powering off from
File browser.

* Ensure untoggle works when starting with light off
7 years ago
Frans de Jonge 23cd585fae Support history as default view for filemanager (#3058)
Fixes #2774

* make history view borderless
* add new menu for what to start with

Should combine nicely with #2940
7 years ago
Hzj_jie a4d5165f7a Several fixes in frontlight logic (#2991)
* Use PluginShare to exchange data between plugins

* Remove legacy code in reader.lua and kobo/device.lua, and move KOBO_LIGHT_ON_START to kobo/powerd.lua

* A better sync config logic

* Consider kobo without hardware frontlight toggle

* update frontlight widget once toggle is tapped.
7 years ago
Hzj_jie 808766b7f3 Remove the deprecated restore_settings flag 7 years ago
Hzj_jie 30378eb2a8 Add restart koreader function and ensure FlushSettings event can be delivered to all widgets (#2772) 7 years ago
Frans de Jonge 89099e2c94 Swipe for menu and quickstart guide (#2761)
* Swipe for menu and quickstart guide

Because swiping for the menu is a big change from what we're used to, this commit includes a new quickstart guide.

Fixes #2608.

* add some dev docs
* add FileConverter spec
* add QuickStart spec
* add Version module
* add Version spec
7 years ago
robert00s 1749ab7227 Fix 2716 7 years ago
Robert b4462da1b6 Dialog when reopening book at start (#2259) (#2603) 7 years ago
Frans de Jonge c855494ba0 Minor: don't turn off wifi on exit
This fixes #2379 and #2511.
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
Qingping Hou dae4a5a413 refactor: move bootstrap code into setupkoenv.lua
add ffi.load patch
add kodev prompt command
8 years ago
Qingping Hou 93873bfd69 plugins(chore): fix static check errors 8 years ago
Qingping Hou 4540d51a6e settings: add entry to toggle debug mode 8 years ago
Qingping Hou a407036acd minor: always flush banner to stdout 8 years ago
Qingping Hou db5a872ec6 minor: turn off wifi on exit 8 years ago
Qingping Hou 5309a0a47f misc: rotate crash.log for kobo/kindle/pocketbook 8 years ago
chrox 9ab005a1d3 fix unit test of readerlink and readerpaging
and have more confidence with the unit testing framework.

Now `make testfront` won't retry on failure and testing files are
ordered in each run so that it's possible to reproduce testing failure.

And this patch also fix flush settings not working before suspend issue:
at some point the `FlushSettings` event is sent to `UIManager` instead
of `ReaderUI`, but `UIManager` only delegated events to active widgets
and `ReaderUI` is actually not an active widgets thus will miss the event.

This patch also add a verbose debug mode with "-v" as a switch to turn
on this mode. With verbose mode on, event handling will be logged.
8 years ago
chrox 7ea12c0198 fix broken unit tests on Travis CI
1. It turns out that `device_id` is not defined in unit test environment
which makes the `assert(self.kosync_device_id)` fail and somehow makes `luajit` segmentation fault.
2. In the device spec, stubbing `io.open` will make subsquent `require`
all return boolean value and segmentation fault `luajit`.

This patch is a minimum viable change that makes CI work on both my
local box and Travis.
8 years ago
Zijie He 820a39c8f7 Update KOSyncClient 8 years ago
Qingping Hou 85398dc2d5 luasettings: new module to handle genric settings
also use luasettings for reader settings
8 years ago
Zijie He 882a815f6c Use default font if settings.reader.lua does not provide one. Provide a Toggle button if readerfooter gesture actions are disabled. 8 years ago
Frans de Jonge 5638819f25 Removed a bunch of "successfully", replaced an ellipsis, and some deviant spellings of KOReader. 8 years ago