View Single Post
Old 12-18-2018, 02:12 AM   #63
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
ePub left/right margins step size (testing)

I haven't found how to change the space at the top of the ePub, but while looking I found this patch which might be useful to some in its own right. I haven't tested it on firmware 4.12.12111, but here it is in case someone else wants to try:

Quote:
Left/Right margin size seems to be calculated in ReaderService::setViewport as W*(N/100.0), where W is screen width and N is the value selected from the margins slider. This patch changes the denominator from 100.0 (1% step size) to 200.0 (0.5% step size). Change 200.0 to any other value you like, e.g. 125.0 = 0.8%, 133.3 = 0.75%, 400.0 = 0.25%, etc. (percentage of screen width.)

Note that the step value N is affected by the `Custom left/right margins` patch, and if you use the `ePub fixed/adjustable top/bottom margins` patch then you should adjust the suggested step size value in that patch to match the change made here, e.g. halve it there if using the 200.0 value here.

Beware that enabling this patch means that the margin step size will be different in ePub and KePub books, which could be annoying if you read both. To be really useful we would also need a KePub version of this patch, plus a patch to add more values to the margins slider.

(And as always, the actual final margin size might be affected by things in the individual book's stylesheet.)
ePub left/right margins step size: (libnickel.so.1.0.0.yaml)
Spoiler:
Code:
ePub left/right margins step size:
  - Enabled: no
  # Local constant in ReaderService::setViewport
  - ReplaceFloat: {Offset: 0x490178, Find: 100.0, Replace: 200.0}

Last edited by GeoffR; 12-18-2018 at 02:14 AM. Reason: Added - Enabled: no to patch
GeoffR is offline   Reply With Quote