~ubuntu-docviewer-dev/ubuntu-docviewer-app/lo-viewer

« back to all changes in this revision

Viewing changes to src/plugin/libreofficetoolkit-qml-plugin/lozoom.cpp

  • Committer: Tarmac
  • Author(s): Stefano Verzegnassi
  • Date: 2016-02-04 18:09:08 UTC
  • mfrom: (247.2.7 lok-content-centered)
  • Revision ID: tarmac-20160204180908-w9o2ha0pme3qi1ce
LibreOffice viewer:
* Show the viewer content at the center of the canvas (excluded spreadsheets)
* Fixed some bug in ScalingPinchArea
* Added a ScalingMouseArea component, for handling the double-tap-to-zoom gesture
* Set the zoom behaviour according to the parameters returned by LOZoom class
* Changed background color for the viewer
* Fixed 'rebound' behaviour for the LOK Viewer
* Added missing signal emissions in LOZoom. Fixes: https://bugs.launchpad.net/bugs/1501424, https://bugs.launchpad.net/bugs/1515655, https://bugs.launchpad.net/bugs/1541582.

Approved by Alan Pope , Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
    m_valueFitToWidthZoom = getZoomToFitWidth(m_view->parentFlickable()->width(),
167
167
                                              m_view->document()->documentSize(currentPart).width());
168
168
 
 
169
    Q_EMIT valueFitToWidthZoomChanged();
 
170
 
169
171
    if (m_zoomFactor != m_valueFitToWidthZoom) {
170
172
        setZoomFactor(m_valueFitToWidthZoom);
171
173
 
189
191
    m_valueFitToHeightZoom = getZoomToFitHeight(m_view->parentFlickable()->height(),
190
192
                                                m_view->document()->documentSize(currentPart).height());
191
193
 
 
194
    Q_EMIT valueFitToHeightZoomChanged();
 
195
 
192
196
    if (m_zoomFactor != m_valueFitToHeightZoom) {
193
197
        setZoomFactor(m_valueFitToHeightZoom);
194
198
 
217
221
 
218
222
    m_valueAutomaticZoom = qMin(m_valueFitToWidthZoom, m_valueFitToHeightZoom);
219
223
 
 
224
    Q_EMIT valueFitToWidthZoomChanged();
 
225
    Q_EMIT valueFitToHeightZoomChanged();
 
226
    Q_EMIT valueAutomaticZoomChanged();
 
227
 
220
228
    if (m_zoomFactor != m_valueAutomaticZoom) {
221
229
        setZoomFactor(m_valueAutomaticZoom);
222
230