summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-08-22 19:12:45 (GMT)
committerTobias Markmann <tm@ayena.de>2016-08-22 19:12:45 (GMT)
commitff6034574d984f2d201c033efc00faeae055691e (patch)
tree5f3ea2dff15515b61e92384edf0fc8a02d7c8f1c /Swift/QtUI/QtTextEdit.cpp
parentec40ba1c1ff258bfe24bc5e7b024cf2e6eaed810 (diff)
downloadswift-ff6034574d984f2d201c033efc00faeae055691e.zip
swift-ff6034574d984f2d201c033efc00faeae055691e.tar.bz2
Add shortcuts to change chat view font size
Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1. Change-Id: Ie96bae26e4001b3955007064313ae76cb47c0a7e
Diffstat (limited to 'Swift/QtUI/QtTextEdit.cpp')
-rw-r--r--Swift/QtUI/QtTextEdit.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Swift/QtUI/QtTextEdit.cpp b/Swift/QtUI/QtTextEdit.cpp
index 3143192..4ffd32a 100644
--- a/Swift/QtUI/QtTextEdit.cpp
+++ b/Swift/QtUI/QtTextEdit.cpp
@@ -12,6 +12,7 @@
#include <QApplication>
#include <QKeyEvent>
+#include <QKeySequence>
#include <QMenu>
#include <QTextDocument>
@@ -60,6 +61,8 @@ void QtTextEdit::keyPressEvent(QKeyEvent* event) {
|| (key == Qt::Key_Tab && modifiers == Qt::ControlModifier)
|| (key == Qt::Key_A && modifiers == Qt::AltModifier)
|| (key == Qt::Key_Tab)
+ || (event->matches(QKeySequence::ZoomIn))
+ || (event->matches(QKeySequence::ZoomOut))
) {
emit unhandledKeyPressEvent(event);
}