Commit f3322d13 authored by Steffen Hartleib's avatar Steffen Hartleib
Browse files

fix follow issues with touch, if global scaling is used in display config:

* Thumbnail stuck in max size if you change size witch pinch gesture
* don't working swipe left gesture
parent 39545a03
......@@ -772,8 +772,9 @@ void DocumentView::swipeRight()
void DocumentView::swipeLeft()
{
const QSizeF dipSize = d->mAdapter->imageView()->dipDocumentSize();
const QPoint scrollPos = d->mAdapter->scrollPos().toPoint();
const int width = d->mAdapter->document()->width() * d->mAdapter->zoom();
const int width = dipSize.width() * d->mAdapter->zoom();
const QRect visibleRect = d->mAdapter->visibleDocumentRect().toRect();
const int x = scrollPos.x() + visibleRect.width();
if (x >= (width - 1)) {
......
......@@ -719,7 +719,7 @@ void ThumbnailView::startDrag(Qt::DropActions)
void ThumbnailView::setZoomParameter()
{
const qreal sensitivityModifier = 0.25;
d->mTouch->setZoomParameter(sensitivityModifier, d->mThumbnailSize.width());
d->mTouch->setZoomParameter(sensitivityModifier, thumbnailSize().width());
}
void ThumbnailView::zoomGesture(qreal newZoom, const QPoint&)
......
Markdown is supported
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