Commit Graph

35 Commits (master)

Author SHA1 Message Date
zwim bf58723af1
[CoverImage] Honor rotation after opening of a book (#11752)
If rotation changes, create a new cache entry and use that if necessary.

Fixes #11713.
21 hours ago
hius07 fc7181419f
CoverImage: custom cover support (#10553) 11 months ago
zwim 180cebe7ee
[CoverImage] use units in SpinWidget (#9938) 1 year ago
greatyingzi 61364ffc33
[chore] CoverImage: unified call method for Device.screen (#9839)
Co-authored-by: greatyingzi <greatyingzi@github.com>
1 year ago
NiLuJe fadee1f5dc
Clarify our OOP semantics across the codebase (#9586)
Basically:

* Use `extend` for class definitions
* Use `new` for object instantiations

That includes some minor code cleanups along the way:

* Updated `Widget`'s docs to make the semantics clearer.
* Removed `should_restrict_JIT` (it's been dead code since https://github.com/koreader/android-luajit-launcher/pull/283)
* Minor refactoring of LuaSettings/LuaData/LuaDefaults/DocSettings to behave (mostly, they are instantiated via `open` instead of `new`) like everything else and handle inheritance properly (i.e., DocSettings is now a proper LuaSettings subclass).
* Default to `WidgetContainer` instead of `InputContainer` for stuff that doesn't actually setup key/gesture events.
* Ditto for explicit `*Listener` only classes, make sure they're based on `EventListener` instead of something uselessly fancier.
* Unless absolutely necessary, do not store references in class objects, ever; only values. Instead, always store references in instances, to avoid both sneaky inheritance issues, and sneaky GC pinning of stale references.
  * ReaderUI: Fix one such issue with its `active_widgets` array, with critical implications, as it essentially pinned *all* of ReaderUI's modules, including their reference to the `Document` instance (i.e., that was a big-ass leak).
* Terminal: Make sure the shell is killed on plugin teardown.
* InputText: Fix Home/End/Del physical keys to behave sensibly.
* InputContainer/WidgetContainer: If necessary, compute self.dimen at paintTo time (previously, only InputContainers did, which might have had something to do with random widgets unconcerned about input using it as a baseclass instead of WidgetContainer...).
* OverlapGroup: Compute self.dimen at *init* time, because for some reason it needs to do that, but do it directly in OverlapGroup instead of going through a weird WidgetContainer method that it was the sole user of.
* ReaderCropping: Under no circumstances should a Document instance member (here, self.bbox) risk being `nil`ed!
* Kobo: Minor code cleanups.
2 years ago
zwim 0548eaa95b
CoverImage: fix translatable (#9301)
This PR fixes #9299
2 years ago
Philip Chan 107156c0a8
[feat] Non-touch improvements (#8859)
FocusManager: fix round x use y layout
FocusManager: add tab and shift tab focus navigation support
FocusManager: handle Press key by default
FocusManager: make sure selected in instance level
FocusManager: add hold event support
FocusManager: Half move instead of edge move
FocusManager: add keymap override support
FocusManager: refocusWidget will delegate to parent FocusManager
Focusmanager: refocusWidget can execute on next tick
inputtext: can move out of focus on back
inputtext: fix cannot exit for non-touch device
inputtext: fix cannot input text with kindle dx physical keyboard
fontlightwidget: add non-touch support
datetimewidget: add non-touch support
datetimewidget: fix set date failed in kindle DX, fix datetimewidget month range to 1~23 by default
datetimewidget: make hour max value to 23
multiinputdialog: add non-touch support
checkbox: focusable and focus style
virtualkeyboard: no need to press two back to unfocus inputtext
virtualkeyboard: collect FocusManager event key names to let VirtualKeyboard disable them
openwithdialog: add non-touch support
inputdialog: can close via back button
enable all InputDialog and MultiInputDialog can be close by back
keyboardlayoutdialog: non-touch support
readertoc: non touch device can expand/collapse in toc
bookstatuswidget: non touch support
keyvaluepage: non-touch support
calendarview: non-touch support
2 years ago
zwim befc0d9c83
[Coverimage, plugin] Clean up, typo (#8565)
SizeSpinner: "Set" is disabled if the value has not changed, so no need to check this in the callback function.

Corrected typo.

Optimized code.
2 years ago
zwim eb4e958303
[Coverimage, plugin] Colons in menus; unlock sizespinner (#8430) 3 years ago
hius07 1e47cd7e5f
SpinWidget: similar size in portrait and landscape (#8226) 3 years ago
hius07 684fd6c12d
Standardize select/choose to choose (#8128)
Closes #8105.
3 years ago
zwim 1a526a33c2
CoverImage plugin: allow writing grayscale BMPs (#8054) 3 years ago
zwim 31e6294315
[plugin] CoverImage: Use blksize for size of cached files (#7705) 3 years ago
Frans de Jonge 0ec74612db
Fix stupid typo (#7678)
I was still thinking about 341d6ac660 I suppose.

Hat tip to @yparitcher.
3 years ago
Frans de Jonge a3575134af
Fix docs (#7674)
See https://github.com/koreader/koreader/pull/7668#issuecomment-840404170
3 years ago
zwim 0d6be41c75
Better strings (#7611) 3 years ago
zwim fafc0bc678
Missed translatable (#7603) 3 years ago
zwim c8d5330631
Typo (#7601) 3 years ago
zwim 5ed272a786
Fix translation template (#7591) 3 years ago
Frans de Jonge e107aad42e
[fix] Use template 3 years ago
Frans de Jonge b81b8cfb2f
[chore] Fix typo 3 years ago
Frans de Jonge 36b40e02e7
[chore] Directory to folder (#7584) 3 years ago
zwim e4c9409f97
[plugin] Add a caching mechanism for CoverImage (#7510) 3 years ago
hius07 17129915f9
Standardize directory/folder to folder (#7410)
Follow-up to https://github.com/koreader/koreader/pull/7328
3 years ago
NiLuJe bf6c0cdd6c
LuaSettings: Add a method to initialize a setting properly (#7371)
* LuaSettings/DocSettings: Updated readSetting API to allow proper initialization to default.
Use it to initialize tables, e.g., fixing corner-cases in readerFooter that could prevent settings from being saved.
(Fixes an issue reported on Gitter).
* LuaSettings/DocSettings: Add simpler API than the the flip* ones to toggle boolean settings.
* Update LuaSettings/DocSettigns usage throughout the codebase to use the dedicated boolean methods wher appropriate, and clean up some of the more mind-bending uses.
* FileChooser: Implement an extended default exclusion list (fix #2360)
* ScreenSaver: Refactor to avoid the pile of kludges this was threatening to become. Code should be easier to follow and use, and fallbacks now behave as expected (fix #4418).
3 years ago
gbyl 10f65a16e7
CoverImage plugin: adjust wording (#7309) 3 years ago
zwim 6c0345de17
CoverImage: Alternative image fit (#7221) 3 years ago
Frans de Jonge 582807f971
[chore, plugins] CoverImage: move newline outside translated string (#6985) 3 years ago
zwim 0a6ef6e351
CoverImage plugin: allow saving covers as JPG (#6924) 3 years ago
zwim 52f66a89d2
CoverImage plugin: enable on Remarkable and PocketBook (#6906) 3 years ago
zwim 3137f5a158
CoverImage plugin: allow saving covers as BMP (#6904) 3 years ago
zwim 2785f0d113
Remove leftover and correct info message on empty fallback (#6897)
Cf. https://github.com/koreader/koreader/pull/6813#discussion_r527459959
4 years ago
zwim 31fe3b87c3
CoverImage plugin: add "Size and background" options (#6884) 4 years ago
zwim bab55bfa0d
Typo in Text (#6871) 4 years ago
zwim 926e7dd402
coverimage plugin (#6813)
* Plugin for saving the cover image to file. Useful in some e-ink android devices.
4 years ago