~ubuntu-branches/ubuntu/wily/scribus/wily-proposed

« back to all changes in this revision

Viewing changes to scribus/canvasmode_magnifier.cpp

  • Committer: Package Import Robot
  • Author(s): Oleksandr Moskalenko
  • Date: 2012-02-09 21:50:56 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120209215056-2wrx1ara0jbm7fi5
Tags: 1.4.0.dfsg+r17287-1
* New upstream stable release upload into Debian (Closes: #654703).
* Applied the Ubuntu armel patch.
* Removed non-free color swatches from resources.
* debian/control:
  - Moved icc-profiles from Recommends to Suggests (Closes: #655885).
  - Updated Standards-Version to 3.9.2.
  - Updated extended description per lintian warning.
* debian/rules:
  - Update mailcap (Closes: #630751). A request for mime.types update has
    been sent to the mime-support maintainer.
  - Added build-arch and build-indep targets per lintian warning.
* debian/patches:
  - top_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't install the non-free "doc" dir.
  - profiles_cmakelists.patch - don't install non-free sRGB profile.
* debian/copyright: 
  - Converted to the DEP5 machine readable foramt.
  - Added licenses for free color swatches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
        m_doc->leaveDrag = false;
154
154
        m->accept();
155
155
        m_view->registerMousePress(m->globalPos());
156
 
        Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
157
 
        Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
 
156
        Mxp = mousePointDoc.x();
 
157
        Myp = mousePointDoc.y();
158
158
        Rxp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).x();
159
159
        Mxp = qRound(Rxp);
160
160
        Ryp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).y();
205
205
                {
206
206
                        QRect geom = m_view->redrawMarker->geometry().normalized();
207
207
                        FPoint nx = m_canvas->globalToCanvas(QPoint(geom.x() + geom.width() / 2, geom.y() + geom.height() / 2));
208
 
                        double scaleAdjust = m_view->visibleWidth() / static_cast<double>(qMax(geom.width(), 1));
209
 
                        /*m_view->setScale(m_canvas->scale() * scaleAdjust);
210
 
                        m_view->slotDoZoom();
211
 
                        m_view->SetCCPo(nx.x(), nx.y());*/
 
208
                        double scaleH = m_view->visibleWidth() / static_cast<double>(qMax(geom.width(), 1));
 
209
                        double scaleV = m_view->visibleHeight() / static_cast<double>(qMax(geom.height(), 1));
 
210
                        double scaleAdjust = qMax(0.5, qMin(scaleH, scaleV));
212
211
                        m_view->zoom(nx.x(), nx.y(), m_canvas->scale() * scaleAdjust, false);
213
212
                        if (sc == m_canvas->scale())
214
213
                        {