Commit Graph

392 Commits (master)

Author SHA1 Message Date
NiLuJe 1820c616a1
[RFC] Switch ConfigDialog's rotation toggle to custom icons (#7306) 3 years ago
Frans de Jonge 893026a2ef
[chore] Fix a few Persian keyboard luacheck issues (#7253)
Cf. <https://github.com/koreader/koreader/pulls#issuecomment-774345230>.
3 years ago
poire-z 3b89e32069 [UX] Add ToC/Bookmarks settings
- Menu widget: allow specifying the number of items per
  page and the item font size, so we can use other values
  than the default File browser ones
- Menu: fix setDirty when a border is used
- ToC: add item per page and font size settings, make
  Alternative ToC more visible (was previously
  available on long-press on Table of contents)
- Bookmarks: add item per page, font size, size reduction
- Progress bars (Skim widget and footer): allow selecting
  ToC depths from which ticks are made.
3 years ago
Monirzadeh 6f50d67b5d
[UX] Add Persian keyboard (#7222)
Fixes #5791.
3 years ago
NiLuJe b41567e0e6 ConfigDialog: Check alt_name_text if name_text isn't set,
as it is used for the "Set as default" popup.
This allows having that text accurate on widgets without an
actual name_text (e.g., the font size wheel).

Fix #7231

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
3 years ago
poire-z cdafd9438c Georgian keyboard: remove unused variable (luacheck) 3 years ago
Beka Arabuli f665a25e70
Georgian keyboard (#7225) 3 years ago
poire-z 49e2d91afb Don't toggle the footer when toggling the top status bar 3 years ago
poire-z 05126b94b6 Dual pages: shown as 2 columns on a single page
Rework Dual pages code so that the view is considered
a single page number, so it looks more like 2-columns
on a single page.
This solves a few issues like:
- Page number and count are consistent between top
  and bottom status bars
- SkimTo -1/+1 doing nothing every other tap
- Statistics being wrong (like "Pages read" never
  going over half of the book page count)
3 years ago
Frans de Jonge 5c9dc850e8
Address assorted Weblate comments (#7154)
* Fix typo in dropbox

Reported by @lescheck

* Rephrase text justification explanation more elegantly

* CoverBrowser: fix up some plurals

* Statistics: remove random use of template function

* Use ngettext for minute/minutes and second/seconds

* Change KB/MB/GB to kB/MB/GB SI units
3 years ago
poire-z 396d1fbf46
bump crengine: parsing, lists, 2-pages mode fixes & tweaks (#7138)
Includes:
- EPUB: fix truncated HEAD>STYLE stylesheet
- XML parsing: slightly better parsing of <script>
- Update German hyphenation patterns
- (chore) Silence some clang warnings
- (Upstream) CSS content: fix regression with open-quote/close-quote
- (Upstream) HTML lists: support the 'reversed' attribute
- (Upstream) Tweak list items disc/circle/square symbols
- 2-pages mode: option to skip geometry checks

CRE bottom menu: allow toggling Dual Pages in portrait mode.
3 years ago
poire-z 9b11497652 KOPT bottom menu: hide it when applying Zoom options 3 years ago
poire-z b92c078e9c ConfigDialog: temporarily hide when showing SpinWidgets
Hide bottom panel when showing a SpinWidget, so we gain
on the bottom the space covered by the SpinWidget to see
more how a change is affecting the book text.
For clarity, rename delay_repaint & refresh_callback
to hide_on_apply & when_applied_callback.

Normalize SpinWidgets: have them both accept a
cancel_callback and a close_callback.
InfoMessage: call dissmiss_callback also on timeout.
3 years ago
poire-z 4043ba27b0 CRE: fix to Top/Bottom margins fine tuning
Rework eb66856d so that "Sync T/B Margins" is disabled
when set Top and Bottom margins differ (previously,
the bottom one was taking over the top one when
it was enabled).
3 years ago
NiLuJe 3060dc81af
Revamp "flash_ui" handling (#7118)
* Wherever possible, do an actual dumb invert on the Screen BB instead of repainting the widget, *then* inverting it (which is what the "invert" flag does).
* Instead of playing with nextTick/tickAfterNext delays, explicitly fence stuff with forceRePaint
* And, in the few cases where said Mk. 7 quirk kicks in, make the fences more marked by using a well-placed WAIT_FOR_UPDATE_COMPLETE

* Fix an issue in Button where show/hide & enable/disable where actually all toggles, which meant that duplicate calls or timing issues would do the wrong thing. (This broke dimming some icons, and mistakenly dropped the background from FM chevrons, for example).
* Speaking of, fix Button's hide/show to actually restore the background properly (there was a stupid typo in the variable name)
* Still in Button, fix the insanity of the double repaint on rounded buttons. Turns out it made sense, after all (and was related to said missing background, and bad interaction with invert & text with no background).
* KeyValuePage suffered from a similar issue with broken highlights (all black) because of missing backgrounds.
* In ConfigDialog, only instanciate IconButtons once (because every tab switch causes a full instantiation; and the initial display implies a full instanciation and an initial tab switch). Otherwise, both instances linger, and catch taps, and as such, double highlights.
* ConfigDialog: Restore the "don't repaint ReaderUI" when switching between similarly sized tabs (re #6131). I never could reproduce that on eInk, and I can't now on the emulator, so I'm assuming @poire-z fixed it during the swap to SVG icons.
* KeyValuePage: Only instanciate Buttons once (again, this is a widget that goes through a full init every page). Again, caused highlight/dimming issues because buttons were stacked.
* Menu: Ditto.
* TouchMenu: Now home of the gnarliest unhilight heuristics, because of the sheer amount of different things that can happen (and/or thanks to stuff not flagged covers_fullscreen properly ;p).

* Bump base
https://github.com/koreader/koreader-base/pull/1280
https://github.com/koreader/koreader-base/pull/1282
https://github.com/koreader/koreader-base/pull/1283
https://github.com/koreader/koreader-base/pull/1284

* Bump android-luajit-launcher
https://github.com/koreader/android-luajit-launcher/pull/284
https://github.com/koreader/android-luajit-launcher/pull/285
https://github.com/koreader/android-luajit-launcher/pull/286
https://github.com/koreader/android-luajit-launcher/pull/287
3 years ago
poire-z eb66856d81
CRE: allow both Top/Bottom margins fine tuning (#7104)
By having the same DoubleSpinWidget launched when
hitting "..." on any of Top margin or Bottom margin
progress bars.
DoubleSpinWidget: remove blank space when no info_text.
3 years ago
yparitcher c3fd6ae38b Margins: allow direct input (more_options) 3 years ago
poire-z 24424e505e Update UI layout code to use new SVG icons
- Add IconWidget, use it for icons instead of ImageWidget.
  Specify icons by name only, look for them (with either
  .svg or .png suffixes) in multiple directories (including
  koreader/settings/icons/ to allow customizing them).
  Don't crash when icon name not found, shown a black
  background warning icon instead.
- Don't trust the icons' native sizes: replace
  scale_for_dpi=true with width/height=DGENERIC_ICON_SIZE,
  so all icons get the same (tunable) size - except in
  a few specific use cases.
- Top and bottom menu bars: normalize, and have icons
  properly centered in them, extend vertical line
  separators up to the edges.
- TOC: adjust expand/collapse icons size to items size
3 years ago
poire-z a0eb91d6ab
Some RTL UI fix up after #6885 (#6975)
Avoid crash with RTL UI after options we moved.
Swap Zoom direction items when RTL UI.
Also don't check show_func when sizing the names
on the bottom menu, to avoid icons moving or
resizing when toggling options.
3 years ago
Frans de Jonge 908e3ae363
[chore] Don't translate numbers (#6928)
Cross-ref to <https://github.com/koreader/koreader/pull/6885>.
4 years ago
jperon 1f16815f94
[chore] Get rid of ui/data/strings.lua (#6921)
As suggested [here](https://github.com/koreader/koreader/pull/6885#issuecomment-734865881)
4 years ago
jperon 8eeb010dc9
Paged documents: rework zoom options (#6885)
- Move zoom options from top menu to bottom config
- Add option to manually define zoom (relative to
  page width) and overlap (in percent)
- Add options to zoom to columns or rows, possibly
  with overlap. Add panning direction options when
  page forward in these modes
4 years ago
tastytea 9277568a65
Apply CSS tweaks for links to all elements below a elements. (#6856)
This is for ebooks that have <span> inside of <a>.
4 years ago
poire-z 8f2bdf959d Style tweaks: fix some wording 4 years ago
Marek Gibek 20a413389c
[UX] Add Polish keyboard layout (#6762) 4 years ago
poire-z 4d53ec76fe
bump crengine: ODT support, more typography languages (#6675)
Includes:
- Update German hyphenation patterns
- (Upstream) Adds ODT (ODF) format support
- TextLang, hyphenation: add Basque, Croatian, Esperanto,
  Estonian, Georgian, Latvian, Lithuanian, Macedonian,
  Occitan, Welsh; update Bulgarian, Irish, Portuguese,
  Slovak, Dutch, Norwegian, Spanish; update hyphen min
  for Czech, English, Greek; fix Romanian and Ukrainian
  pattern file names
- HyphMan: adds HyphMethod::getLeft/RightHyphenMin()
- epub.css: update HR default style
- fb2.css: keep <date> in main text left-aligned
- getRenderedWidths(): inline-block and table fixes
- CSS: avoid style hash mismatch when serializing content:''
- Tables: re-order row groups when necessary
- XML parsing: don't drop trailing text
- HTML parser: tweak implicit head/body insertion code
- Fix text search failure when blank at start or end

readertypography.lua: some cleanup by removing the first
table listing hyph dicts, and including their filenames
in the second table so we can build the first table
dynamically. Also fetch hyph left/right min limits from
crengine to not have to duplicate them here and keep them
in sync.
css_tweaks.lua: for in-page footnotes, switched from
"-cr-only-if: epub-document" to ": -fb2-document"
("not" FB2 documents), so these tweaks also work with
DocX and ODT footnotes.

Also included in base bump:
- KOPTContext: add comic panel detection function/additional
  leptonica declarations
- Forcibly disable docs when building giflib
4 years ago
poire-z c8b8ee3ba9
bump crengine: better linebreaks at em-dash, fb2 fixes (#6521)
Includes:
- (Upstream) LVBase64NodeStream: fix possible segfault
- (Upstream) Fix getting encoding from HTML META tags
- FB2: also look for cover in <src-title-info>
- FB2: fix cover image colors
- FB2: don't draw cover in scroll mode
- TextLang: better linebreaks at em-dash (EN/ES/FR)
- TextLang: increase _lb_props static array size

FB2 footnotes style tweaks: avoid gap above first footnote,
caused by the title bottom margin collapsing into it.
4 years ago
poire-z cc653ef5b0 Style tweaks: limit EPUB/FB2 footnotes to these formats
Avoid conflicts having "In-page EPUB footnotes (smaller)"
affects FB2 documents that use "<a type=note>12</a>" which
would then get smaller if both tweaks are enabled (which
they are, by default).
Also switch "-cr-hint: strut-confined" from being set on "*"
to being set only on "body", now that it is inherited.
Footnote popups: add styles for some non-HTML FB2 tags,
so MuPDF can render them as expected.
4 years ago
zwim 4349272d9c
[UX] German keyboard layout qwertz (#6385)
Add support for German keyboard. It's mainly en_keyoard.lua with changed z/Z and y/Y.
4 years ago
yparitcher f7d538b108
Landscape FM / Refactor rotation (#6309)
* landscape FM / Refactor rotation

refactor and simplify the orientation handling code. the user generally cares about the rotation (what direction the device is facing) and not about if koreader is displaying in portrait or landscape mode

* bump base

update luasocket, libjpeg-turbo, curl
add logging to evernote-sdk-lua
update framebuffer for proper rotation
4 years ago
poire-z 71744688c7 Style tweaks: use 0.8rem instead of 80% for in-page footnotes 4 years ago
poire-z 8a568a2721 bump crengine: add support for <ruby> elements
Includes:
- Fix some non-recursive subtree walkers
- Text: skip formatting optimisations when inlineBoxes
- CSS parsing: parse selectors starting with [attrib]
- Use T="" for internal elements attributes
- CSS: re-order css_d_* (display) enum for easier checking
- Rendering methods: remove erm_table_cell
- Rendering methods: remove erm_table_caption
- Rendering methods: remove erm_list_item
- getRenderedWidths(): better estimate table width
- styleToTextFmtFlags(): adds is_block parameter
- Adds support for "display: ruby" and <ruby> elements
- Fix prev/next-VisibleWord-Start/End() with CJK text

Also bump HarfBuzz to 2.6.8 and evernote-lua-sdk.
4 years ago
smartscripts-nl 23ab5750c3
Fix missing glyphs Ï and Ö in keyboard popup (#6254)
Fixes #6221.
4 years ago
poire-z c1be488a11 Keyboard: better isolation of FR/ES/TR from EN base
dofile() wasn't enough to copy en_keyboard, as the references
to key popups would still be shared, and hacks to them (as
done by the FR keyboard) would be active on the EN keyboard.
Also, for the FR Keyboard:
- bring M key popup too when moving it to 2nd row.
- keep original ',' and '.' as on EN keyboard.
- add ';' instead of ',' as the added key, and let it have
  some key popup too, with keys helpful when CSS editing.
4 years ago
poire-z 3e71e4985e bump crengine: support for pseudo elements ::before/after
Includes:
- GIF decoding: avoid crash on some images
- Top progress bar: avoid re-computing when not needed
- Top progress bar: allow external filling of marks
- CSS/Text: properly inherit and handle text-align-last
- getRenderedWidths(): fix handling of text-indent
- Reorder some flags to make the sets clearer
- CSS: support more white-space named values
- Text: fix standalone BR not making an empty line (rework)
- CSS: support for pseudo elements ::before & ::after
- CSS: content: open-quote support via TextLangMan
- CSS/Text selection: adds a few "-cr-hint:" tweaks
cre.cpp: adds setHeaderProgressMarks()

Added 2 style tweaks to disable pseudo elements
::before/after and common ligatures.
4 years ago
poire-z 1e244d0358 [UX] Add fine tune for Word Spacing
Using DoubleSpinWidget.
Also keep SpinWidgets open on Apply.
Added little trick: if widget has been moved, close
bottom config menu on next Apply to show more of
the book.
4 years ago
poire-z 8991540462
Reorganize bottom menu config panels (#6131)
Mostly for the PDF bottom menu.
- Reorganize by topic, trying to limit the number
  of widgets per panel to 4.
- Re-order some toggles from low to high ('off' then 'on').
- Show font size as number instead of a list of "Aa".
- PDF: add more font size values, and increase usable
  contrast values.
- Add help_text to most PDF toggle titles.
- CRE line spacing: increase fine tuning min and max.
Also avoid zoom advice messages on book load.
4 years ago
poire-z e074b603e0 Adds Word Expansion: use of letter spacing for justification
Bump crengine:
- Text: fix occasional BiDi bad word splitting
- Font: fix HB fallback measurement/drawing mismatches
- Font: do not add letter spacing on diacritics
- Text: tunable use of letter spacing for justification
- Text: dont adjust space after initial quotation mark/dash (rework)
- Text: fix possible bad widths after collapsed spaces

xtext.cpp: pick crengine fix with HB fallback
measurement/drawing mismatches

Adds "Word Expansion" to bottom Font size menu, and moved
"Word Spacing" there too, to balance the panels' heights
to 4 items.
4 years ago
poire-z 8d8b8cd0f7 FB2 footnotes: some more tweaks
- Add some style tweaks to allow displaying FB2 end notes
  in-page too - and to allow showing them without a smaller
  font size.
- Show footnote number in bold in popup footnotes.
4 years ago
mergen3107 7d51fa2b5d
[UX] Update Russian keyboard layout (#5957)
Closes #5953.
4 years ago
poire-z 72f2cef472
Style tweaks: enable EPUB/FB2 in-page footnotes by default (#5908)
Set these 2 tweaks as default global tweaks for new users
(and existing users that have not set any global defaults).
One can disable them by long-press on each of them.
Only per-specs EPUB and FB2 footnotes (other in-page footnotes
tweaks may trigger on non-footnote content on some books, so
let enabling them be a user decision).
4 years ago
poire-z a5232594d9 FB2 footnotes: handle them just as other footnotes
- FB2 footnotes are no more rendered in-page by default
- In-page rendering can be enable by the added Style tweak
- FB2 footnotes can also show in footnote popup (with
  some added not-so-nice CSS so MuPDF can render them
  as crengine)
4 years ago
poire-z 74efb24b9d Style tweaks: force List items bullet/decimal style 4 years ago
poire-z f0c6fc92db Style tweaks: reorganize in submenus, add a few
Try to limit the nb of items per menu page to 5 or 6 by
splitting related ones into sub-menus, so we get more
room below to see how they affect the content.
Adds "No indentation on first/following paragraphs" and
"Paragraphs margins and paddings", and Links underlining.
4 years ago
poire-z 1ccc658401 Style tweaks: adds "Enforce steady line heights"
And re-order them a bit to group the line-height related
ones together.
4 years ago
Mustafa Ali Mutlu 5724971466 add turkish f keyboard layout (#5795) 4 years ago
yparitcher 236609c431 fix arabic keyboard to conform to #5639 (#5793)
Fixes #5792
4 years ago
WaseemAlkurdi c8b3942bf4 [UX] Keyboard for Arabic and languages with Arabic script (#5569) 4 years ago
Robert 73a0f2f9d1 Remove DSCROLL_MODE and DGLOBALGAMMA (#5754) 4 years ago
poire-z 0599c440cc [RTL UI] Bidi-wrap filenames, paths, urls, metadata
bidi.lua:
- Revert "Alias everything to Bidi.nowrap() when in LTR UI,
  as using LTR isolates seems uneeded when already LTR" (part
  of a628714f) which was a wrong assumption: we need proper
  wrappers for all things paths. Enhance some of these wrappers.
- Fix GetText RTL wrapping which was losing empty lines and
  trailing \n.

- Wrap all paths, directories, filenames in the code with
  these wrappers.
- Wrap all book metadata (title, authors...) with BD.auto(),
  as it helps fixing some edge cases (like open/close quotation
  marks which are not considered as bracket types by FriBiDi).
  (Needed some minor logic changes in CoverBrowser.)

- Tweak hyphenation menu text
- Update forgotten SortWidget for UI mirroring
- KoptConfig: update "justification" index for RTL re-ordering,
  following the recent addition of the page_gap_height option.
4 years ago
Mustafa Ali Mutlu 12adb96206 [feat] Option to change page gap in continuous mode (#5705)
Fixes #5656.
4 years ago
poire-z 5ea1a7c817 Style tweaks: In-page footnotes: add some classic classnames 4 years ago
Frans de Jonge 0ea889aecb
[fix] Restore most Japanese keyboard layers (#5709)
The Japanese keyboard still needs to be cleaned out a bit more at some point, but the important thing is that this commit fixes #5632 by restoring the kanji layer with the voiced-unvoiced conversion symbol.
4 years ago
Robert c3a0bd4def Remove DFULL_SCREEN (#5695) 4 years ago
Frans de Jonge 7d231acad0
[UX] Simple symbol keyboard layer paging (#5659)
Use 1/2 and 2/2 instead of Shift on the symbol layer.
4 years ago
poire-z 7952fa2c09 [RTL UI] update widgets and apps for UI mirroring
Small tweaks all around to handle UI mirroring:
- swap existing symbols like arrows, or use alternative ones
- rotate some images, like chevrons and dogear icons
- flip some left and right swipe handling
- flip some geometry arithmetic like tap on left or right
  side of page or dict window
- use new ProgressWidget:getPercentageFromPosition() instead
  of geometry arithmetic
- BD.wrap() some concatenated string bits, like in reader
  and menu footers
- flip inverse_reading_order when UI is mirrored

More specific tweaks:
- ReaderGesture: reset some specific gestures when UI direction
  has changed (tap on top/bottom left/right corners, for
  bookmarks and FileManager "Plus menu").
- ReaderRolling: show markers on the correct side of page,
  in single or dual page mode.
- KoptOptions: swap left and right icons in Alignment toggle
- CheckMark: proper rendering in all 4 mirroring/rtl combinations.
- VirtualKeyboard: forbid any mirroring
- Move util.getMenuText into Menu.lua
5 years ago
Mihai Vasiliu e8f91ab399 [UX] ru keyboard ё popup and translation (#5662)
Changes in this commit:
- Fix arrays to large (10 elements instead of 8) copied from the old keyboard system.  Issue introduced in #5610 
- Add ё popup.
- Change shift key as per #5659 (for both ro and ru keyboards)
- Translate Russian space and symbol keys.
- Rename Sym key to 123
5 years ago
Mihai Vasiliu 2541440bb8 [UX] Add Romanian keyboard layout (#5660)
This adds a new separate Romanian keyboard layout, with popup support.

- Functional buttons are translated.
- Pages 5&6 contain 3 groups of characters (I tried my best to group them logically):
  - On the left: traditional Romanian cyrillic pre-1850s
  - On the middle latinised forms from 1850s onwards
  - On the right modern diacritics from 1900s to today
- Pages 7&8 add only large double quotes and section/paragraph mark.
- Popups are only avalable for most common diacritics. Swipe up for circumflex, swipe down for breve.

I can really call this the most complete though-the-ages Romanian keyboard. :)
5 years ago
Mihai Vasiliu 849bd951ed [UX] Add Moldavian diacritics to ru_keyboard (#5652)
Added Ӂӂ on the Russian layout popup for Moldavian.
5 years ago
poire-z 5541d5f5d3 bump crengine: word spacing and hyphenation tweaks
Includes:
- New option to tune word spacing: space width scale percent
- Text: look for hyphenation in more words if needed
- CSS: fix "hyphens:none" should override inherited "hyphens:auto"
- getHtml(): grab dir= and lang= attributes from upper nodes

Replace our Word Gap/Space condensing toggle/setting with
a new Word Spacing toggle/setting, made of 2 values:
- 1st number scales the normal width of spaces in all font
  (100% uses the font space width untouched)
- 2nd number applies after the 1st has been applied, and
  tells how much these spaces can additionally be condensed
  to make more text fit on a line.
5 years ago
poire-z 13fa6d962c Korean keyboard: unwrap InputText on layout change
The korean keyboard wraps InputText and overrides some
of its methods to process input in some specific way.
When switching to another keyboard layout, the original
methods need to be restored.
5 years ago
Robert d93206a841 Remove DCREREADER_PROGRESS_BAR (#5641) 5 years ago
NiLuJe 4778d3db3b
[RFC] Switch remaining keyboard icons to glyphs (#5639)
* Switch the last few remaining icons to true glyphs
(Del/Backspace & Enter).
Also, allow a glyph to be rendered in (fake) bold, and use it for Enter.
* Update fonts
Pickup the tweaked nerdfonts for the backspace symbol
5 years ago
NiLuJe d8e0b1759b
Other minor frontend.util cleanups (#5629)
* Resync fixUtf8 w/ upstream
* Fix lastIndexOf desc
* Drop unichar usage, it's a crappier unicodeCodepointToUtf8 ;).
5 years ago
Frans de Jonge 15fe0fef07
[chore] Extract Cyrillic/Russian keyboard (#5610)
Follow-up to #5583.

* Add separate Cyrillic/Russian keyboard

* And remove that from English

* Update French keyboard (is easy)

* Remove yahzhert, that was just a double of QWERTY

* Update Spanish keyboard

* Reduce Japanese to 4 layers and add globe

* Reduce Korean to 4 layers

* Reduce Greek to 8 layers
5 years ago
yparitcher 5e8d1227ef [feat, UX] Pick keyboard layout from keyboard (#5583)
* Tap goes to next activated keyboard.
* Hold opens a selection popup.
5 years ago
poire-z 6baa2af5fb
cre: use 'best' (Harfbuzz) as the default kerning method (#5553)
It might be slower, but is needed to properly display
books in arabic, indic...
Also bump crengine: use FreeType "light" hinting algorithm,
which hints on the y-axis only (and so avoid messing with
advances and kerning on the x-axis).
5 years ago
poire-z 3e3b00429f
EPUB: more support for RTL documents (#5436)
bump crengine: enhanced RTL block rendering.
Includes:
- Re-enable: Use the same FT load flags in HB as in FT
- Avoid redundant calls to getStyle()
- CSS: parse and store "direction:"
- Enhanced block rendering: handle RTL direction
- Enhanced block rendering: handle RTL tables
- Pagesplitting: account for lines' text direction
- CSS: add support for more pseudo-classes
- epub.css: a few updates for RTL documents
- Fix LVDocView::getBookmark() which could be slow or wrong

Add a few style tweaks useful to RTL readers.

Wikipedia Save as EPUB: build proper RTL documents from
persian, arabic, hebrew (and others) Wikipedia articles.
5 years ago
Robert a934d2d52e [UX] Add fine tune for zoom(dpi) and font size (#5432)
Close: #5312
5 years ago
Robert 02218cb9e2 [UX] Add fine tune in contrast (#5413) 5 years ago
yparitcher 31b9f78384 [UX] Add Hebrew keyboard (#5414) 5 years ago
noEmbryo fe9ab1c77c Move accented Greek characters to the "Accented" group (#5402) 5 years ago
noEmbryo 6a2e4b7a08 Update el_keyboard.lua (#5400)
Set the Greek characters as the default

Cf. https://github.com/koreader/koreader/pull/5318#issuecomment-532705016
5 years ago
Robert 54568d4dcd [UX] Add fine tune in line spacing (#5375)
See https://github.com/koreader/koreader/issues/5312#issuecomment-528506421

Progress widget has a new extra button ⋮ that triggers SpinWidget.
5 years ago
Robert b038fa3046 [UX] Add fine tune buttons to horizontal margins (#5303)
Similar to top and bottom margins I add fine tune buttons to L/R margins.
5 years ago
Frans de Jonge f1f6eebce0
[feat] Add MuPDF EPUB/FB2 dynamic font size (#5282)
Closes #4368.
5 years ago
Frans de Jonge 6ed58346a1
[i18n] Add translator notes (#5250)
Thanks to <https://github.com/koreader/koreader/pull/5237> we can now  extract the knowledge currently embedded in Transifex and put it directly in our source. This positively affects <https://github.com/koreader/koreader/issues/3754>.

Translation instructions and knowledge that comes out of localization-related questions should be preserved in the source, because Transifex is too ephemeral. For example, the links from <https://github.com/koreader/koreader/pull/2290> are no longer accessible. Even when they are, it's quite useful to have this information around while dealing with the code as well, and I also hope it'll be informative to contributors who seldom visit Transifex.

This commit also makes a few minor changes to obviate the need for comments where possible.
5 years ago
Frans de Jonge a2dcfe9aec
[doc] Tag @todo, @fixme and @warning (#5244)
This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.

Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:

```sh
ldoc --tags todo,fixme *.lua
```

However, whether that particular usage offers any advantage over other search tools is questionable at best.

* and some random beautification
5 years ago
Frans de Jonge 182e981f4d
[fix, i18n] Translate "not set" (#5246)
Somehow this one slipped through the cracks for years.
5 years ago
Frans de Jonge da988c15de
[CI] Switch to custom xgettext build to extract multiline strings (#5242)
Because let's face it, it just looks much better this way.

Docker image update in https://github.com/koreader/virdevenv/pull/43

Discussion in https://github.com/koreader/koreader/pull/5238#issuecomment-523675211 and https://github.com/koreader/koreader/pull/4524
5 years ago
Frans de Jonge e2ceace302
[fix, CI] Push to Transifex from master, fix multiline strings for xgettext (#5238)
Related to https://github.com/koreader/koreader/pull/5237
5 years ago
Frans de Jonge fbd331dd07
[i18n] Switch `make pot` to xgettext (#5237)
This introduces context to our strings to differentiate them when necessary.

The syntax chosen is `C_()`, following [glib](https://developer.gnome.org/glib/2.28/glib-I18N.html#C-:CAPS).

```lua
local _ = require("gettext")
local C_ = _.pgettext

C_("Menu|StyleTweaks|", "Pages")
```

Closes #5232.
5 years ago
Robert c57beada27 [chore] Remove Polish keyboard (#5223) 5 years ago
noEmbryo 570180196b [UX] Update for the greek popups (#5193)
Just used the north (upper) part of the popup wherever I could, because is more accessible.
5 years ago
Frans de Jonge ac15143c14
[lang] Rename 'Scroll Mode' to 'Continuous' (#5169)
The current name causes people to think of scrolling, which is slightly awkward on E Ink. For example, see <https://github.com/koreader/koreader/issues/5166#issuecomment-517771475>.

> But this on LCD, not E-ink where the lag is unbearable, especially if you want to correct any scrolling over/undershoot.

Scroll mode is a misnomer. It should be renamed continuous. I use "scroll mode" as the default, but I seldom or never scroll. Conversely, you can still scroll in paged mode if a page is longer than the screen. As far as I'm concerned if you're scrolling (panning) you may be doing it wrong, but to anyone reading: you do you. ;-)
5 years ago
Frans de Jonge 55973771f9
[lang] Minor CSS tweaks stylistic improvements (#5128)
Pluralizing paddings like this is a bit unidiomatic, and that "all" seems a bit redundant.

Cf. <https://github.com/koreader/koreader/pull/5127>.
5 years ago
poire-z fd5e4df142 Style tweaks: adds Ignore all vertical/horizontal margins/paddings
Provides a bit more granularity than the generic "Ignore all
publisher margins" - and allow the same for paddings for books
that wrongly use paddings for that effect.
5 years ago
poire-z aedc5a4806 Style tweaks: update for latest epub.css, added a few more
- Updated "Avoid page break" tweaks to work on our latest epub.css.
- Added "New page on headings>" menu, as we no more break page on
H1, H2, H3 in EPUBs.
- Added "Center headings" as we no more have them centered.
- Added "Pure black and white" which can make some documents
  more readable.
5 years ago
poire-z 9f3c85ed83 cre: toggable enhanced rendering (floats, collapsed margins...)
Adds "Render mode" toggle with 4 modes, to enable some or all
of crengine's new enhanced block rendering features.
Use "legacy" rendering for previously opened books to not mess
with bookmarks, and "web" (all of the new features) for new books.

Also make available the added "HTML5" stylesheet to the Style menu.
5 years ago
NiLuJe 4ccb1f3dd5
Allow disabling automagic image inversion in Nightmode in CRe (#5095)
* Allow disabling automagic image inversion in NightMode

Fix #4986
5 years ago
Frans de Jonge 5df31f2dbf
[doc, fix] Some documentation issues (#5066)
Fixes #5065.
5 years ago
limerainne 53b6e3d018 [i18n] Add Korean keyboard (2-beolsik) (#5053) 5 years ago
poire-z 34e6f41e05
cre: fix 2 footnotes issues, bump crengine (#5031)
- Popup footnotes: workaround strange behaviour of MuPDF
  which is adding some unwanted margin above elements
  with an "id=" attribute.
- In-page footnotes: also remove any left and right margin,
  to keep footnotes aligned with the main text.
  Also add 2 classnames (witnessed in quite a few recent
  french books) to the list of classic classnames.
- Also bump crengine: CSS: fix parsing of multi classnames
  and attributes selectors
5 years ago
Frans de Jonge 5d7dbb4466
[UX] Update Greek keyboard with swipes & popup (#5028)
Closes #5023. Thanks to @noembryo.
5 years ago
poire-z 7c53fcd922 CRe margins: hide bottom menu on change (#5000)
So we can immediately see how's the bottom margin.
5 years ago
NiLuJe f3decdc26c [fix] Restore PAGE_MARGIN string (#4993)
It's used by KOptConfig

Fix #4992
Regression since #4945
5 years ago
poire-z bf07c44009
CRe margins: add toggle to sync top and bottom margins (#4990)
Also fix DogEar size update on margin change.
Also re-order cre bottom tabs to be like with kopt.
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
Frans de Jonge 3f670baaa2
[UX] Keyboard popup: add X (#4977) 5 years ago
Frans de Jonge 4782f5ffc1
[UX] Keyboard popup: add = (#4950)
As suggested by @Biep in https://github.com/koreader/koreader/pull/4889#issuecomment-485158316
5 years ago
Frans de Jonge 8ec42d1e60
[fix] Actually commit V popup data (#4940)
Overlooked in https://github.com/koreader/koreader/pull/4938
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
Frans de Jonge 6203fbb633
[UX] Keyboard popup: add V diacritics (#4938) 5 years ago
Frans de Jonge c053e48526
[UX] Keyboard popup: add Y diacritics (#4935) 5 years ago
Frans de Jonge 04c39a8591
[UX] Keyboard popup: add R diacritics (IPA edition) (#4934) 5 years ago
Frans de Jonge 1299ae93a8
[UX] Keyboard popup: add P (#4932)
Only Greek pi seems to make sense here.
5 years ago
Frans de Jonge 39b48d56c0
[UX] Keyboard popup: add N and M diacritics (#4930) 5 years ago
Frans de Jonge 7e06db9c2a
[UX] Keyboard popup: add H and J (#4920) 5 years ago
Frans de Jonge a507f753fb
[UX] Keyboard popup: minor changes to S (#4918)
Split sigma into upper and lowercase to make room for esh.
5 years ago
Frans de Jonge 06a73ba550
[UX] Keyboard popup: add F and G (#4914) 5 years ago
Frans de Jonge 742453a047
[UX] Keyboard popup: add Q and W (#4913)
Mainly for easy swipe access to `[]{}`.
5 years ago
Frans de Jonge 762b4bef26
[UX] Keyboard popup: add C diacritics (#4912) 5 years ago
Frans de Jonge d27393d723
[UX] Keyboard O popup: add Ø (#4911)
Danish/Norse and IPA close-mid front rounded vowel.

Requested by @gerhaher over in https://github.com/koreader/koreader/pull/4907#issuecomment-482784459
5 years ago
Frans de Jonge ad62cc23e2
[UX] Keyboard popup: add Z diacritics (#4910) 5 years ago
Frans de Jonge 74e14a927c
[UX] Keyboard popup: k and l diacritics (#4908)
There doesn't seem to be much going on in k-land, and I like using proper hyphens and dashes.
5 years ago
poire-z d3aaff135c
Update FR and ES keyboards (#4906)
Extend the FR and ES keyboards from the EN one, and
just tweak what has to be changed.
This will allow them to stay in sync with the EN keyboard's
recent and futur developments of key popups.
Also make the FR keyboard a bit more AZERTY.
5 years ago
Frans de Jonge 6f8a077f32
[UX] Keyboard popups: stubs for the rest of the vowels (I, O, U) (#4907)
With the basic pattern of diacritics and special characters established by now, the basic diacritics + IPA don't need too much thought for an initial draft.

Cf. https://github.com/koreader/koreader/pull/4906#discussion_r274966796
5 years ago
Frans de Jonge 9b26178118
[UX] Keyboard popup: add T diacritics (#4905)
The Ťť is used in Czech and Slovak. The t-comma Țț is Romanian. The rest is a combination of IPA, Greek, and why not.
5 years ago
Frans de Jonge 58d88b12ab
[UX] Keyboard: add d diacritics (#4898)
Eth (ð) is an important letter for people who like Old English (me), and for IPA.

Ď/ď is Czech/Slovak.

Đ/đ is sometimes an alternative rendering of ð, maybe because you could type it on a traditional typewriter. It's also Slavic and something Vietnamese.

Delta is an often-used Greek letter.
5 years ago
Frans de Jonge c35f96c819
[UX] VirtualKeyPopup: add B, comma, and period popups (#4893)
Adds B because it's on the same row as a comma.
5 years ago
Frans de Jonge 2d5cbafd27
[UX] Keyboard: add S diacritics (#4890) 5 years ago
Frans de Jonge 80953b5c4c
[UX] Keyboard: add @ and A diacritics (#4889)
Also rename std to en_keyboard.
5 years ago
Frans de Jonge 2760b98582
[UX] Add keyboard swipes (#4884)
Only the `e` and `E` are added in this initial commit.
5 years ago
NiLuJe 645d41eda9
Add more granularity in line-height settings with CRe (#4785)
70 -> 130, in steps of 5 ;).
5 years ago
poire-z c060595580
ConfigDialog: fix ButtonProgressWidget and some refreshes (#4793)
This internal ButtonProgressWidget widget was behaving
differently from all others (OptionTextItem, OptionIconItem
and ToggleSwitch) by duplicating some code from
ConfigDialog:onConfigChoose() instead of calling it directly.

While making it similar to others, I noticed that onConfigChoose()
did a full repaint, which was necessary for some settings to
be applied (ie: Contrast).
On CreDocument, this full repaint may cause some double drawing
on config changes (ie: Margins, drawing once after margin changes,
and then re-positionning to previous xpointer).
So, make the need for full repaint a condition on KoptOptions.
5 years ago
poire-z ce3d181e24
cre 2-pages: rename toggle to "Dual Pages" (#4788) 5 years ago
poire-z 22bc9dacb5 cre landscape view: adds 1 page / 2 pages toggable
Adds a toggle switch in the Orientation bottom config menu to
allow showing 1 page or 2 pages when in landscape mode.
Previously, this was hardcoded to be in 2-pages modes only
in some circumstances (device resolution + user dpi).
5 years ago
Qingping Hou bf40b5d5e6 avoid assigning screen as local variable in creoptions 5 years ago
Qingping Hou 9e57e56f95 decouple UI definitions from document modules 5 years ago
Frans de Jonge c1b4085b93
[UX] Add cropping: none mapped to page width zoom (#4696)
Fixes #1923.
5 years ago
Frans de Jonge 9fb7801974
[fix] ConfigMenu cre margins hold action (#4702)
See https://github.com/koreader/koreader/pull/4691#issuecomment-468905263
5 years ago
Frans de Jonge 1d1dc74290 [UX] creoptions: add more margin values
Fixes #4684.
5 years ago
NiLuJe 812e595608
Enable HW dithering in a few key places (#4541)
* Enable HW dithering on supported devices (Clara HD, Forma; Oasis 2, PW4)
  * FileManager and co. (where appropriate, i.e., when covers are shown)
  * Book Status
  * Reader, where appropriate:
    * CRe: on pages whith image content (for over 7.5% of the screen area, should hopefully leave stuff like bullet points or small scene breaks alone).
    * Other engines: on user-request (in the gear tab of the bottom menu), via the new "Dithering" knob (will only appear on supported devices).
  * ScreenSaver
  * ImageViewer
* Minimize repaints when flash_ui is enabled (by, almost everywhere, only repainting the flashing element, and not the toplevel window which hosts it).
  (The first pass of this involved fixing a few Button instances whose show_parent was wrong, in particular, chevrons in the FM & TopMenu).
* Hunted down a few redundant repaints (unneeded setDirty("all") calls),
  either by switching the widget to nil when only a refresh was needed, and not a repaint,
  or by passing the appropritate widget to setDirty.
  (Note to self: Enable *verbose* debugging to catch broken setDirty calls via its post guard).
  There were also a few instances of 'em right behind a widget close.
* Don't repaint the underlying widget when initially showing TopMenu & ConfigDialog.
  We unfortunately do need to do it when switching tabs, because of their variable heights.
* On Kobo, disabled the extra and completely useless full refresh before suspend/reboot/poweroff, as well as on resume. No more double refreshes!
* Fix another debug guard in Kobo sysfs_light
* Switch ImageWidget & ImageViewer mostly to "ui" updates, which will be better suited to image content pretty much everywhere, REAGL or not.

PS: (Almost 💯 commits! :D)
5 years ago
poire-z b0e127fd31 Adds "Generic web browser paragraph style" tweak 5 years ago
poire-z 335a513826 [chore] cleanup multi-lines translatable strings
Revert 9971eb85 and make multi-lines strings more readable.
(Multiline translatable strings extraction has been fixed
in koreader-misc tralua_xgettext.py.)
5 years ago
poire-z 391360dd8c
bump crengine: adds support for 'orphans:' and 'widows:' (#4490)
Includes:
- (Upstream) Harfbuzz light: fix rendering of fallback font
- CSS: adds support for 'orphans:' and 'widows:' properties

Adds some Style tweaks related to Widows and orphans.
5 years ago
poire-z 19280078de bump crengine: Harfbuzz light, WTF-8, corrupted ZIPs
Includes:
- EPUB: workaround ZIP files with corrupted central directories
- Supports book text encoded in WTF-8
- Harfbuzz kerning (full): fix possible wrong flags
- (Upstream) Adds new kerning method: Harfbuzz light, without ligatures

Adds Harfbuzz light kerning methods as the 3rd toggle.
5 years ago
poire-z f533acb7f9 InfoMessage: avoid overflowing screen height with long messages
When no height= provided, and the InfoMessage would overflow
screen height when some long message is provided, decrease the
font size until the widget fit.
5 years ago
Frans de Jonge 6b59101aa4
[fix] Dictionary download: repackage lzip to gzip (#4466)
Fixes #4465.
5 years ago
Frans de Jonge bba7635763
[lang] CSS tweaks: fix typo (#4456) 5 years ago
poire-z f8d8863712 Style tweaks: split in-page footnote tweaks
Split the In-page footnotes tweak into 3 distinct ones,
mainly because I want the 3rd one with classic class names
to be disabled'able, while keeping the others, in case
these classic class names are not used for footnotes.

Also fix footnotes list-style-type in Wikipedia EPUBs,
which may have been wrong (but it was less noticable when
following page links because of the little black marker,
or showing them in popup footnotes where the number/letter
is not shown).
5 years ago
Frans de Jonge ee673b1e10 cre: in-page footnotes and alternative TOC: fix wording
Co-Authored-By: poire-z <poire-z@users.noreply.github.com>
5 years ago
poire-z 3fe6eeff71 cre: adds in-page footnotes and alternative TOC hints tweaks
Adds 2 tweaks to allow displaying footnotes at the bottom of pages,
like it's done in some printed books. This will work only with
books with correctly specified footnotes with the adequate EPUB
attributes, and with Wikipedia EPUBs. But users may be able to
activate them for other books with some user style tweaks.

Adds a few tweaks to control the build of the alternative TOC.
With some user style tweaks, one may be able to build a usable
TOC for some badly formatted or converted books.

Also fixes 2 paragraphs tweaks.
5 years ago
NiLuJe f6743a45db
Proper Forma support (#4414)
* Enforce a known rotation on startup, to make sure we handle touch input coordinates properly.
* Proper FrontLight warmth support (thanks to @cairnsh & @pazos in #4291)!
* Fix the PageTurn buttons mapping to match Nickel's defaults
* Properly remap PageTurn buttons depending on the current rotation.
* Actually enable the Mk.7 screen refresh codepath on *all* Mk.7 devices (I'd messed up the device check...).
* Full accelerometer handling (includes a touch of refactoring regarding orientation handling in general).
* Fix insidiously broken USBMS behavior in Nickel after we exit on FW >4.8.

Fix #4291
Fix #3002
5 years ago
Frans de Jonge c41dfc25dd
[feat] Add many more downloadable dictionaries (#4401)
* Virtually the entire list that was originally on Sourceforge, except for some dictionaries with unclear or questionable licences.

* Without the Webster's duplicates. The GCIDE (GNU Collaborative International Dictionary of English), already included, is the extended version of it.

* Without Freelang. To "dissociate" dictionaries, the permission of individual authors has to be obtained.

Many thanks to @avsej who prepared it all.

See https://github.com/koreader/koreader/pull/3176#issuecomment-447085441
5 years ago
Frans de Jonge b261a647c2
[feat] Add dictionary download option (#3176)
You can now download pretty much all of the easily available freely licensed dictionaries I could find.
6 years ago
poire-z 98c3f0d366
bump crengine: fix max image height, handle <epub:switch> (#4390)
Includes:
- (Upstream) Fix dangerous compile warnings
- Fix max image height to prevent spurious page breaks
- Hide <epub:case> in <epub:switch>, show only <epub:default>

Adds a style tweak to show <epub:case> and hide <epub:default>
for the curious person.
6 years ago
poire-z 74c3c90faa
Style tweaks: move some sub-menus to first-level menu (#4384)
We don't need that first-level menu to be short
as it contains no tweak itself (only the submenus
with toggable tweaks need to be kept shorter to
let room below to see the tweak effects).
6 years ago
poire-z ea946d52d6 bump crengine: tables rendering improvements and others
bump crengine, which includes:
- Adds support for symbol fonts (local or embedded)
- Fix some issues when rendering text in constrained width
- Page splitting: fix possible missing blocks
- CSS: adds support for 'auto', ignore % for borders
- Fix right border drawing position
- Fix: adds missing properties in copystyle()
- Adds comments, erm_killed rendering method
- Adds getRenderedWidths(): get node min/max node content width
- Tables rendering: fixes and improvements
- getRenderedWidths: enable min_width to be a single CJK char
- Fix wrong text wrap avoid in some case
- epub.css: add style for 'blockquote'
- Fix rendering issue when line ends with an image

Adds a few style tweaks related to tables.

Enforce table width: 100% in Wikipedia EPUBs to keep
previous look, which feels better with the various kinds
of tables in Wikipedia pages.

Fix unit tests as juliet.epub (full of blockquotes), grew quite
a few pages with the epub.css update.
6 years ago
Frans de Jonge 923d9e0a89
[UX] Add paragraph whitespace/indent style tweaks (#4358)
Requested on the forum, and it makes a lot of sense.

https://www.mobileread.com/forums/showthread.php?p=3777972#post3777972
6 years ago
Frans de Jonge 49192c96d8
[fix, lang] Replace CSS jargon with natural English (#4343)
See https://github.com/koreader/koreader/pull/4307/files#r234400330
6 years ago
poire-z 26aeb6121c
bump crengine: fix vertical-align and others (#4307)
bump crengine, which includes:
- Avoid uneeded re-rendering on load when with full status bar
- Update french hyphenation pattern
- Fix border-collapse on table cells in some cases
- Fix line-height inheritance when no unit
- Fix: don't ignore space following an image
- Fix: ignore occasional space at start of line
- Fix possible segfault when viewing HTML
- Fix and extend support of vertical-align

Also add a style tweak to middle align images with text, which
may make some text with inline icons and such nicer (depending
on images sizes and selected Zoom/DPI).
6 years ago
poire-z 9377be7e8c Style tweaks: adds 2 page break related tweaks
So we have more tools to kill empty pages.
6 years ago
Martín Fernández a6df153d2c add spanish keyboard with Ñ character (#4244) 6 years ago
poire-z b2c89b93b6
Small keyboards updates (std, fr) (#4177)
Provided by @gerhaher: removed some duplicated keys, replaced
them with other useful ones (to swedish and kenyan people).
Stick cyrillic letter io to a single key
French keyboard: aligned to std.lua, fixed '.' and ',' keys.
6 years ago
poire-z e1ba5ccffe Various minor fixes (#4172)
- css tweaks: use correct CSS "hyphens:" instead of "hyphenate:"
- screenshoter: more logical order of lines (no change in what it does)
- textviewer: make diagonal swipe really trigger a full refresh
- textwidget: more adequate text length to help with centering
- toggleswitch: fix sizing & centering with correct calculations
  (this reduces a bit the size of switches, and may cause a new
  truncation in some translations)
6 years ago
poire-z 6f2368e3bc
cre: configurable kerning method (off/freetype/harfbuzz) (#4167)
Bump base & crengine for HarfBuzz support.
6 years ago
Frans de Jonge 8333754c13 Greek keyboard update (#4152)
By @embryo10, see https://www.mobileread.com/forums/showpost.php?p=3733400&postcount=2952
6 years ago
poire-z 9971eb8533 Fix untranslatable strings (#4132)
Some problem somewhere with [[...]] strings starting with a
leading newline. Should probably be allowed, but for now
fix the few such cases to allow them being translated.
6 years ago
poire-z 7d8ccda852
Style tweaks: re-order Allow hyphenation on all text (#4050)
Should be just below with the other Ignore publisher stuff
(as we allow hyphenation by default).
6 years ago
Robert 2484f0f3bc Style tweaks: adds Allow hyphenation on all text (#4047)
Also fix vertical-align for sub in 'Smaller sub- and superscript'
6 years ago
poire-z a08416d2f8
Add some help texts to long press popup on bottom config titles (#4048) 6 years ago
sebastien 71ff69ec4f cre word gap: use values from defaults.lua (#4045) 6 years ago
poire-z d8e58a08fd
bump crengine: adds support for dpi-based css units (#4040)
Adds a new toggle to the bottom menu: Zoom (dpi), which
allows for scaling CSS absolute units and image sizes.
6 years ago
Robert d29a65b96e cre: add Word Gap setting to bottom config panel (#4026)
Maps to crengine's Space Condensing feature (named Word Gap
as a similar feature is named for PDF)
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
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 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
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 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
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
onde2rock dfd87447da [UX] Make the reader bottom menu compatible with key navigation (#3785)
* [toggleswitch] Add support for key navigation to this widget

Add the onFocus an onUnfocus event handler
add a new function that just circle the switch if not touch event is
detected

* Add key navigation to the readermenu

The shortcut is still Alt-gr on sdl, to be defined on Kindle

* Remove the old method of handling the Press key.

Now the event is handled by the main widget who implement focusmanager
and then dispatched to the currently focused item.
Modify the fine font tuning only for non touch-devices

See : https://github.com/koreader/koreader/pull/3785#issuecomment-375306466
6 years ago
poire-z c93bbec40d
cre: more constrast settings (#3737)
Use ButtonProgress like it was done for kopt.
6 years ago
Robert fe4d52c406 Remove unneeded string S.DARKEST (#3552) 7 years ago
poire-z 8360164e24 Use toggle for CRE Contrast in bottom menu (#3490) 7 years ago
Robert 0def547162 More contrast settings (#3463)
Close: #2133 
More info: #2133
7 years ago
Robert a392fbcca0 [feat] VirtualKeyboard cursor navigation (#3290)
Still lacks Japanese due to insufficient knowledge of the language.
7 years ago
Frans de Jonge 9eb073a524 [travis] Add protection against unscaled sizes
As pointed out by @poire-z

* [fix, UX] SkimToWidget scaling

* [fix] Button scaling

* [fix, UX] Scale ProgressWidget

* [fix, UX] Scale confirmbox

* [fix, UX] Scale just about everything
7 years ago
poire-z 75b7c4b524 Added Font Hinting toggle (#3182) 7 years ago
poire-z 774d2345e0 Added Embedded Fonts config toggle
Just under the existing "Embedded Styles". Support for this
was already there in crengine, and interfacing is similar to
what is done with Embedded Styles.
7 years ago
poire-z a074876cc2 Added french keyboard
Same as std keyboard with only lowercase and uppercase letters layouts
adapted from QWERTY to the traditional french AZERTY layout.
7 years ago
alexandrahurst 71d38ac647 Refactor modifier keys and add basic Japanese keyboard layout (#2930)
* Add a basic Japanese keyboard layout

Allow for entring Japanese text into text boxes.  Only supports kana
and latin letters due to limitations of current VirtualKeyboard
implementation (complex text input with conversion is not possible).

* Allow keyboard layouts to declare custom modifiers

Refactor modifier key setup code and existing keyboard layouts so
that each layout can declare custom modifier key labels.  This
allows for greater extensibility and for future keyboard layouts.
7 years ago
Robert 0b47c81b1a Add Greek keyboard (#2866)
* Add Greek keyboard

* Fix fix raw to row in comments
7 years ago
robert00s 0bbb4bbc16 Fix: missing letters from portuguese language 7 years ago
robert00s 8a9811804d Add Polish keyboard (#2319)
Add Polish keyboard


* Optimization
8 years ago
Frans de Jonge 6091378bc6 Various low-hanging language fruits
* Record to location, see https://github.com/koreader/koreader/pull/2268#issuecomment-252416860
* Defect size, see https://www.transifex.com/houqp/koreader/translate/#nl_NL/koreader/11979947?issue=yes
* Stop publisher/subscriber, see https://www.transifex.com/houqp/koreader/translate/#nl_NL/koreader/27031159?issue=yes and https://www.transifex.com/houqp/koreader/translate/#nl_NL/koreader/27031160?issue=yes and https://www.transifex.com/houqp/koreader/translate/#nl_NL/koreader/27031161?issue=yes
8 years ago
chrox 551857ce6e fix some luacheck warnings 8 years ago
chihyang c161bc2f79 Add a new feature 'read from right to left'
A new feature 'read from right to left' is added, which is more fit for
Traditional Chinese and Japanese books. Once the feature is enabled:
1. The gesture region of TapForward and area will be flipped
horizonally;
2. The action for swiping to west and to east will be exchanged.
8 years ago
chihyang 8251cd6ac8 Add a UI option to set 'read from right to left' 8 years ago
Qingping Hou 6a1fa7f612 move keyboard layout into data modules
also changed keyboard mode for number to 4
8 years ago
chrox 4c491b5ee2 rename 'Highlight' to 'Highlight options' in menu
This should fix #2023.
8 years ago
Zijie He 1aa0c4192a Multi-line toggle switch & add instruction to resolve sdcv build error. 8 years ago
Qingping Hou 11d5b5c0a1 fix(readerlink): restore reader view context on go back 8 years ago
chrox 72012e97e1 disable reflow options when reflow is not ON
This should also fix #1061.
9 years ago
chrox 83cad1c61c larger page margin as a workaround to fix #1422 9 years ago
Frans de Jonge cf93605d04 Change "Screen Mode" to "Orientation"
Screen mode isn't user-oriented. Orientation is.

"Page" in "Page Margin" is redundant
10 years ago
chrox 3574865dcb fix #1166 by auto alignment of option name 10 years ago
Hans-Werner Hilse 3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
10 years ago