Commit Graph

18 Commits (486d7071c7f08dca6b2d247c1d67dae1a615b123)

Author SHA1 Message Date
zwim 486d7071c7
[StatusBar] Allow status bars to be repainted if they are not covered (#9768) 2 years ago
zwim 4969811c08
Optimization: Use constant folding for divisions not a power of two (#9609) 2 years 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
hius07 c5505879c3
ConfigDialog: fix bug in DoubleSpinWidget default values (#9580) 2 years ago
zwim d5d5867d4e
DoubleSpinWidget, SpinWidget: add units, make usage more consistent (#9046) 2 years ago
zwim 84dd58f9df
Power-savings in readerdevicestatus: Schedule on full minute and fix multiple scheduling. (#9032) 2 years ago
zwim 9b9cfe29a4
[feat] Replace TimeVal (RIP) with time, fixed point time seconds (#8999) 2 years ago
hius07 ad09411c3f
DoubleSpinWidget buttons move (#8490)
Move Default and extra buttons above Cancel/OK.
Default values shown in the default button.
Precisions can be set for both values separately.
Minor geometry fix for consistence with SpinWidget.
2 years ago
hius07 ecf378067d
Readerdevicestatus: optimize code (#8194)
Correct read settings.
Standardize showing values in menu (a colon).
SpinWidget and DoubleSpinWidget default widths.
3 years ago
hius07 a8b39c17ed
ReaderDeviceStatus: show only one alert (#8086) 3 years ago
hius07 b622d6edd8
ReaderDeviceStatus: add high battery level alert (#8037) 3 years ago
Frans de Jonge 58a5a09574
Device status: fix ellipsis (#7910) 3 years ago
poire-z d57296b6bc Device status: fix crash in debug mode 3 years ago
NiLuJe 11b50d51ae
Device status: fix wording (#7907) 3 years ago
hius07 884c664f63
Device status alarm: battery and memory (#7857)
Move former low battery alarm into a device status
alarm menu, and add high memory usage checks.
3 years ago
NiLuJe 1f994f8ede
Floor dimension computations (mul/div). (#6264)
* floor most every dimension computations involving MUL or DIV
Should avoid passing nonsensical floating point coordinates/dimensions
to the UI code.

* Update base

* https://github.com/koreader/koreader-base/pull/1113
* https://github.com/koreader/koreader-base/pull/1114
* https://github.com/koreader/koreader-base/pull/1115

* Bump android-luajit-launcher

https://github.com/koreader/android-luajit-launcher/pull/230
https://github.com/koreader/android-luajit-launcher/pull/231
4 years ago
NiLuJe 491f24d3d1 [UX] Don't show low battery warning when charging (#4563)
Fix #4560
5 years ago
Robert 225b5d417d Adds ReaderDeviceStatus: low battery alarm (#4144) 6 years ago