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 );
|
||||
}
|
||||
|
||||
void Editor::wheelEvent ( QWheelEvent * event )
|
||||
{
|
||||
if (event->modifiers() == Qt::ControlModifier) {
|
||||
if (event->delta() > 0 )
|
||||
zoomIn();
|
||||
else if (event->delta() < 0 )
|
||||
zoomOut();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <QWheelEvent>
|
||||
|
||||
#ifdef _QCODE_EDIT_
|
||||
#include <qeditor.h>
|
||||
|
@ -33,5 +34,7 @@ public slots:
|
|||
void unindentSelection();
|
||||
void commentSelection();
|
||||
void uncommentSelection();
|
||||
private:
|
||||
void wheelEvent ( QWheelEvent * event );
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue