added zoom of thumbnails on control+wheel

This commit is contained in:
csoler 2020-06-23 20:24:14 +02:00
parent 97ad766863
commit d39b09c5bc
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
8 changed files with 91 additions and 33 deletions

View file

@ -27,6 +27,14 @@ RSTreeView::RSTreeView(QWidget *parent) : QTreeView(parent)
setMouseTracking(false); // normally the default, but who knows if it's not goign to change in the future.
}
void RSTreeView::wheelEvent(QWheelEvent *e)
{
if(e->modifiers() == Qt::ControlModifier)
emit zoomRequested(e->delta() > 0);
else
QTreeView::wheelEvent(e);
}
void RSTreeView::mouseMoveEvent(QMouseEvent *e)
{
QModelIndex idx = indexAt(e->pos());