git-svn-id: svn://db.shs.com.ru/libs@369 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -604,10 +604,12 @@ void BlockView::wheelEvent(QWheelEvent * e) {
|
||||
if (!is_nav_anim || (nav_anim.state() != QPropertyAnimation::Running))
|
||||
nav_target = _nav();
|
||||
QRectF r = nav_target;
|
||||
double cx = double(e->pos().x()) / viewport()->width(), cy = double(e->pos().y()) / viewport()->height();
|
||||
double vw = viewport()->width(), vh = viewport()->height();
|
||||
double cx = double(e->pos().x()) / vw, cy = double(e->pos().y()) / vh;
|
||||
double pw = r.width(), ph = r.height();
|
||||
r.setWidth(r.width() * scl);
|
||||
r.setHeight(r.height() * scl);
|
||||
//r.setHeight(r.height() * scl);
|
||||
r.setHeight(r.width() * vh / vw);
|
||||
r.translate(cx * (pw - r.width()), cy * (ph - r.height()));
|
||||
animateNav(r);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user