Commit Graph

6121 Commits (5871132c2559f5456ca4b8398957a7e6832c190e)
 

Author SHA1 Message Date
NiLuJe 5871132c25
UI Behavior tweaks (#3983)
* Switch all initial highlights to "fast" update

i.e., everything that does an invert
Plus a few other things that refresh small UI elements onTap
Re #3130

* Tweak refreshtype for a number of widgets:
  * Fix iconbutton dimen
  * Make touchmenu flash on close & initial menu popup. Full-screen on close.
  * Use flashing updates when opening/closing dictionary popup. Full-screen on close.
  * Switch FileManager to partial.
    It's mostly text, and we want flash promotion there.
  * Make configdialog & menu flash on exit
  * Make FLWidget flash on close
  * virtualkeyboard: flash on layout change & popup.
  * Potentially not that great workaround to ensure we actually see the
highlights in the FM's chevrons
  * Flash when closing BookStatus Widget
  * Optimize away a quirk of the dual "fast" update in touchmenu

* Promote updates to flashing slightly more agressively.

* Document what each refreshtype actually does.

With a few guidelines on their optimal usecases.

* Switch remaining scheduleIn(0.0) to nextTick()

* Tighter scheduling timers

Shaving a hundred ms off UI callbacks...

* Cache FFI C Library namespace

* Ask MuPDF to convert pixmaps to BGR on Kobo

Fix #3949

* Mention koxtoolchain in the README

re #3972

* Kindle: Handle *all* fonts via EXT_FONT_DIR instead of bind mounts insanity

* Make black flashes in UI elements user-configurable

(All or nothing).

* Jot down some random KOA2 sysfs path
6 years ago
poire-z bdbaa7dfdd
bump crengine: HTML and rendering fixes (#3992)
- Fix getting xpointer to current page
- epub.css cleanup
- fb2def.h update
- Fix a few edge-case rendering issues
- Fix border being drawn in spite of 'border-width: 0'

Also update Wikipedia epub.css stylesheets regarding
recent HTML fixes and enhancements.
Remove "Remove all borders" workaround tweaks, as it's
now fixed.
(Unit tests failure to be fixed in upcoming commit)
6 years ago
alethiophile 4c8ef61477 Fix sort-by-last-read when partition is mounted noatime (#3990) 6 years ago
Robert 6abc1262dd Screen refresh between chapters (#3989) 6 years ago
Robert 895372f781 Show current and default values in config dialog (pdf) (#3973) 6 years ago
poire-z 56549d5397
Style tweaks: add a few text alignement tweaks (#3979) 6 years ago
poire-z 9b6b91b743
TouchMenu: added hook to show help text on long-press (#3980)
When Hold and there is no hold callback attached to a menu item, a help_text
attribute, when present, is shown in an InfoMessage.
6 years ago
poire-z fe03a3c3fd
Bump crengine for small style fixes (#3981)
- Make the <style> element hidden by default
- epub.css: display <pre> and <code> with a monospace font
6 years ago
poire-z b498d872be
bump crengine: LI and CITE fixes are now the defaults (#3976)
Books previously opened (that have a metadata.lua, whether with
highlights or not, but because they all have a last_xpointer that
points to the current page, that can be broken too by the changes)
will continue to have the old wrong behaviour, so they won't be
impacted by the breaking changes.
Update cre_dom_version code to use the new functions from cre.cpp.
Remove these Workarounds from Style tweaks.
6 years ago
Robert aa303d4aae
Long press on Open last document shows filename to open (#3967) 6 years ago
poire-z 07713be429
Adds "Better rendering of list items" to Style tweaks (#3968)
Alternate rendering of list items as block elements (instead of
inline/final).
Check the built DOM is still coherent with styles on stylesheet
change, and propose to reload the document if not. Also
invalidate cache on close in that case so a new DOM is built
at next opening.
ReaderStyleTweak: fix tweak css duplication; when globally
enabled, when disabling and re-enabling locally, the css would
be added twice to the final CSS.
Also adds !important to "sub_sup_smaller" tweak, and increase
its priority so it can override "font_size_all_inherit".
Adds CreDocument:getCacheFilePath() for futur features.
6 years ago
Robert 6a98dbaec7
Always close filemanger before open document (#3935)
* Always close filemanger before open document

* rev1
6 years ago
Robert b7f67ea8a8 template -> T (#3966) 6 years ago
poire-z c75c5e53ea
Bump crengine: alternative rendering method for list items (#3965)
Includes:
- Factorize ldomXPointer::getRect() and ::getRectEx()
- Toggable alternative rendering method for list items
- Compute nodeStyleDisplayHash and adds isBuiltDomStale()
6 years ago
Robert 6fbb4e4ff4 [feat] Add default to the last value used in ReadTimer (#3963) 6 years ago
Robert 136a72f316 [UX] Notification are displayed too short (#3962)
Changed from 1 second to 2.

I also fixed the problem with blocking the UI when displaying the message. Now notification box is closed after taping anywhere (like InfoMessage).
6 years ago
Robert 693bb84084
Fix show current and default values in config dialog (#3961) 6 years ago
Robert da65db191b Show current and default values in config dialog (epub) (#3952)
when long-press on the title strings on the left of the buttons
6 years ago
NiLuJe 0dbdd2f61f
Try to inhibit USBMS on Kindles (#3957)
re: #3955
6 years ago
NiLuJe 68c1246575
A round of Kindle fixes (#3955)
* Refresh Kindle model ID routines

* Pickup current OTA packages

We stopped shipping files w/ the full .tar.gz extension a looooong time
ago.

* And actually generally handle current packages properly

* Kindle screensaver handling experiment

WIP, because there's a fair bit of insanity left in there.
Namely, USBMS is anathema. We simply shouldn't do that, at all,
but the system allows us to do it and basically shoot ourselves in the
head one way or another.

* Don't try to handle the insanity that would be USBMS on Kindles

* Yay, one less thing to worry about :).

* Okay, that should be much saner...

Since the whole deal w/ letting the WM handle stuff was for SO, restrict
that to SO devices.
The other concern was USBMS, but we can't support it.

* Reword that

* And move that comment inside the branch, like its counterpart
6 years ago
NiLuJe ebf47771d8
Update Google Fonts (#3942)
* Minor cleanup

We don't ship Droid Sans Fallback anymore

* Tweak UI fallback font list for better coverage

* Bump base & fonts

To pickup related changes
6 years ago
Frans de Jonge 32cb1a87cf [chore] Default to shallow clone of binary submodules where history is seldom relevant 6 years ago
Frans de Jonge 2e98cb5cf4 [chore] Make the binary fonts a submodule 6 years ago
poire-z 1144efafff ReaderRolling: update footer when TOC is updated (#3950)
Footer item "pages left in chapter" was wrong when changing font
sizes or some other layout option (the footer was drown before
this happen, and not after, until we later change page).
Seems to also fix possible wrong ticks position in that case
(may be only when cache is used/re-used, for some not really
obvious reason)
6 years ago
Frans de Jonge fcc24fc7b1 [fix, i18n] plugins/SSH.koplugin: public SSH key info (#3947) 6 years ago
poire-z 9e4cb59327
Re-order typeset menu (#3946)
And add symbols for default and fallback to the Hyphenation
menu, as it was done recently to the Font menu.
6 years ago
onde2rock c0e80461ff [feat] Integrated Dropbear SSH server (#3842)
* Add a menu item to start an ssh server

* Add blank login option
6 years ago
Robert fbd549bcfd
End of document action (#3943)
* End of document action

* Rev1

* Rev2

* Rev3

* File browser
6 years ago
poire-z 5b7664b064
Style tweaks: use css snippets to tweak book styles (#3944)
Adds a new menu "Style tweaks", with a few CSS snippets
that can make some things better with some books.
6 years ago
poire-z a9905c5129
Font menu: add symbols for default and fallback fonts (#3941)
Also allows for updating the fallback font and see results
in real-time on the underlying document.
Bump crengine for: fix updating fallback font

Also adds a menu item to generate a html document showing some
sample text rendered with each available font (only if the user has
a file koreader/settings/fonts-test-sample.html with some HTML
snippet of his choice).
6 years ago
NiLuJe e3b7524d9c Another round of Kobo Fixes (#3939)
* Trim unneeded stuff from startup script

I was somehow convinced I'd already done that...
While we're there, explain why we need to siphon those specific vars

* Fix a stray eth0

-> $INTERFACE

* Be very very sure we have INTERFACE set in our env

re #3936

* Make getFirmwareVersion less fragile on Kobo

Not that we actually use it right now, but, still. :D

* Use the same syntax as the PRODUCT check

* Actually implement getProductId

Instead of a stray c/p ^^

* Properly identify the Rev2/Mark7 variants of existing devices

Namely, the H2O² and Aura SE
Not that the H2O²r2 support is still broken, this just allows us to
implement it cleanyl without breaking handling of the original H2O²

re #3925

* Tweak sleeps a bit around Kobo WiFi modules...

See if that jog things up (re #3936)

* Try harder not to suspend with WiFi on on Kobos

Because otherwise, things go boom. (re #3936)
6 years ago
poire-z 62630706bb
bump base/crengine: stylesheet handling improvements (#3934)
Includes:
- Fix a few CSS selector issues
- CSS: add support for some pseudo-classes
- Hyphenation: update fr & de patterns
- CSS: Fix non-lowercasing of specific elements names
- Revert parts of recent BR handling fixes
6 years ago
Robert fedb34c558 Close filemanger after open last document (#3933) 6 years ago
Frans de Jonge e83a0c1078
bump base (#3931)
Includes:

* [feat] Add dropbear as an SSH server https://github.com/koreader/koreader-base/pull/640
* [fix] SDL2: resolve rotation issues https://github.com/koreader/koreader-base/pull/665
* [fix, build] Makefile target should be dropbearmulti, not dropbear https://github.com/koreader/koreader-base/pull/666
6 years ago
Robert e6518c4f68 Use RenderImage:renderImageData insteed of Pic.openJPGDocumentFromMem (#3930) 6 years ago
poire-z 8b2253b3e9
bump base: crengine, freetype, libjpeg-turbo (#3928)
Includes:
- [build] FreeType: bump to 2.9.1
- [build] bump libjpeg-turbo to 1.5.3
- bump crengine:
 - Fix CSS selector specificity computation
 - [fix] crengine/src/lvfntman.cpp: improve letter_spacing limit
 - [fix] crengine/src/lvxml.cpp: add all empty HTML elements
 - html head styles: fix styles not being applied
 - Hyphenation: increase MAX_PATTERN_SIZE from 16 to 35
 - html documents: proper handling of <BR> tags
 - Allows requesting old (broken) XML/DOM building code
- cre.cpp: setStyleSheet(): accept filepath and/or css text,
  and added getIntProperty() and getStringProperty()

credocument/readerrolling: request older XML/DOM building code
for books previously opened, to not lose bookmarks and highlights

(unit tests update because of new handling of consecutive BR via css
pushed links down in the book)
6 years ago
Robert 4bf4578d17 Add HTML widget in GoodReads review (#3929) 6 years ago
Robert 9e67c5a614 CloudStorage: Allow use reserved characters in FTP username and FTP password (#3924)
Depends on RFC 3986 compliant util.urlEncode() and adds unit tests for the new functions.
6 years ago
Frans de Jonge 22950b24f7
bump base for MuPDF 1.13.0 (#3927)
https://github.com/koreader/koreader-base/pull/660
6 years ago
poire-z 43d09e245d
bump base/crengine: stylesheet handling improvements (#3922)
Includes:
- Stylesheets: adds support for '!important'
- Stylesheets: fix parsing of 'inherit' property value
- Stylesheets: implement CSS selectors specificity
6 years ago
mezzarobba a3e16b3920 [fix] make wifi control work with my Kobo Touch N905 (#3920) 6 years ago
poire-z 24d4ab43c4
dict: convert htmlentities in non-html text results (#3921) 6 years ago
onde2rock dad7f209fa [CI] Add a check to detect tab in lua files (#3919) 6 years ago
poire-z 0fc7a5ed6d
ProgressWidget: add some bound checks (#3916)
Avoid drawing the fill bar our of the progress bar.
Avoid zero divided by zero that return 'nan' (Not a Number),
that does not bother lua code, but will crash libblitbuffer.so
when it gets nan as a coordinate.
6 years ago
poire-z cb46412049
bump base/crengine: various fixes (#3917)
Includes:
- html documents: use css defined in <head><style>
- Fix borders color rendering
- Fix some CSS case sensitivity issues
- LVCssDeclaration::parse(): use auto-resizing buffer
6 years ago
poire-z 5db7bab876
bump base/crengine: various fixes (#3908)
Includes:
- table captions: fix link, highlighting and possible segfault
- update French.pattern
- ldomXPointer::toPoint(): add optional use_getRectEx param
cre.cpp: make getPosFromXPointer() uses use_getRectEx=true for better
coordinates accuracy
6 years ago
poire-z 113aefba2e remove dev comment 6 years ago
poire-z 4bb3999cbc RenderImage: factorize all image rendering and scaling code
New module RenderImage (alongside existing RenderText) to provides
image rendering and scaling facilities.
Uses MuPDF, but tries first giflib on GIF.
Allows for getting all the frames from an animated GIF.
6 years ago
poire-z 7a2bf21434 PicDocument:getCoverPageImage(): use first page instead of MuPDF
The dedicated image format library may often give better results
than MuPDF (eg: for animated GIFs).
6 years ago
poire-z 782a57121c ImageViewer: allow viewing a list of images
Mostly useful for browsing the frames of animated GIFs
(but generic enough for other uses).
6 years ago