Skip to content
Commit 26160504 authored by Daniel García Moreno's avatar Daniel García Moreno
Browse files

Added pagination to the GepubWidget

I've added a property to set pagination on/off so the webkitwebview will
be shown with or without scroll.

The pagination is done with the column-width css property, setting the
"body" with the widget width and height and the column-width with the
same widget width, so we change the scroll from vertical to horizontal.
Using this combined with "overflow" css property and with the "scrollTo"
javascript function we can control the page showed.

The position in the book we've the chapter number and the the position
inside this chapter, the position is a percentage that we can get and
set with "gepub_widget_(g/s)et_pos". We store a percentage to make it
valid if the widget size changes, the page is not the same, but the
position is always valid.

To make this work well we need to remove margin and padding from the
body tag, because this affects the column-width.

https://bugzilla.gnome.org/show_bug.cgi?id=768002
parent 0da0ba35
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment