Revision 77947e8...

Go back to digest for 28th April 2013

Features in Office

Sebastian Sauer committed changes in [calligra/coffice] /coffice:

Add zoom.

This adds optimized zooming to COffice. Zooming is
done in multiple phases.

1. When a Zoom-operation starts the DocumentItem is
scaled till the zoom-operation completes. This
gives fluid and fast zooming.

2. Once a zoom-operation finished the DocumentItem's
scale is reverted, the zoom applied to the
PageItem's and there displayed page image and the
Page is marked dirty.

3. When now that page becomes visible for display
an update is scheduled to render a new page image
matching to the zoom.

4. Once the page update is done in the app-thread
and the result send to the UI-thread the displayed
image is replaced with the new one.

Result is that we earn a fluid zooming experience
with pages updated to the new zooming resolution
only when needed (means displayed) what effectively
delays the expensive re-render as long as possible.

For now the previous hacky and pinch-zo-zoom is
disabled. In a follow-up step pinch-to-zoom will
reuse the same zooming code.

File Changes

Modified 7 files
  • /coffice
  •   coffice/AppManager.cpp
  •   coffice/Document.cpp
  •   coffice/Document.h
  •   coffice/DocumentView.cpp
  •   coffice/DocumentView.h
  •   coffice/qml/Button.qml
  •   coffice/qml/DocumentPage.qml
7 files changed in total