tobiasdeiminger added inline comments.

INLINE COMMENTS

> presentationwidget.cpp:900
>  
> -        QPixmap pm( geom.size() );
> +        QPixmap pm( QSize( geom.size().width() * dpr, geom.size().height() * 
> dpr ) );
>          pm.fill( Qt::transparent );

Maybe use a scoped

  const QSizeF pmSize { geom.width() * dpr, geom.height() * dpr };

instead of repeatedly recalculating width and height?

> presentationwidget.cpp:1329
>  
> -    double nX = ( (double)e->x() - (double)geom.left() ) / 
> (double)geom.width();
> -    double nY = ( (double)e->y() - (double)geom.top() ) / 
> (double)geom.height();
> +    QPointF mousePos = e->screenPos();
> +    double nX = ( mousePos.x() - (double)geom.left() ) / 
> (double)geom.width();

Is this change necessary? Conversion to `double` was already there. 
`screenPos()` would change semantic from "relative to widget" to "relative to 
screen". Doesn't matter because widget is probably always full screen. But otoh 
the whole thing is called `PresentationWidget`, so keeping "relative to widget" 
seems reasonable.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D21836

To: sander, #okular, ngraham, tobiasdeiminger
Cc: okular-devel, fbampaloukas, joaonetto, tfella, ngraham, darcyshen, aacid

Reply via email to