mirror of https://github.com/vitalif/openscad
on control + mousewheel, zoomin/zoomout text (like firefox, IE, etc)
parent
b33a02b372
commit
86b5fc02f5
|
@ -97,4 +97,14 @@ void Editor::zoomOut()
|
||||||
this->setFont( tmp_font );
|
this->setFont( tmp_font );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Editor::wheelEvent ( QWheelEvent * event )
|
||||||
|
{
|
||||||
|
if (event->modifiers() == Qt::ControlModifier) {
|
||||||
|
if (event->delta() > 0 )
|
||||||
|
zoomIn();
|
||||||
|
else if (event->delta() < 0 )
|
||||||
|
zoomOut();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include <QWheelEvent>
|
||||||
|
|
||||||
#ifdef _QCODE_EDIT_
|
#ifdef _QCODE_EDIT_
|
||||||
#include <qeditor.h>
|
#include <qeditor.h>
|
||||||
|
@ -33,5 +34,7 @@ public slots:
|
||||||
void unindentSelection();
|
void unindentSelection();
|
||||||
void commentSelection();
|
void commentSelection();
|
||||||
void uncommentSelection();
|
void uncommentSelection();
|
||||||
|
private:
|
||||||
|
void wheelEvent ( QWheelEvent * event );
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue