diff options
Diffstat (limited to 'Swift')
-rw-r--r-- | Swift/QtUI/QtTextEdit.cpp | 6 | ||||
-rw-r--r-- | Swift/QtUI/QtWebView.cpp | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Swift/QtUI/QtTextEdit.cpp b/Swift/QtUI/QtTextEdit.cpp index e9708bf..1b4d76d 100644 --- a/Swift/QtUI/QtTextEdit.cpp +++ b/Swift/QtUI/QtTextEdit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2016 Isode Limited. + * Copyright (c) 2010-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -59,6 +59,10 @@ void QtTextEdit::keyPressEvent(QKeyEvent* event) { || (key == Qt::Key_Tab && modifiers == Qt::ControlModifier) || (key == Qt::Key_A && modifiers == Qt::AltModifier) || (key == Qt::Key_Tab) +#ifdef SWIFTEN_PLATFORM_MACOSX + || (key == Qt::Key_Minus && (modifiers & Qt::ControlModifier)) + || (key == Qt::Key_Equal && (modifiers & Qt::ControlModifier)) +#endif || (event->matches(QKeySequence::ZoomIn)) || (event->matches(QKeySequence::ZoomOut)) ) { diff --git a/Swift/QtUI/QtWebView.cpp b/Swift/QtUI/QtWebView.cpp index abdc17a..967be1a 100644 --- a/Swift/QtUI/QtWebView.cpp +++ b/Swift/QtUI/QtWebView.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2016 Isode Limited. + * Copyright (c) 2010-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -30,12 +30,12 @@ QtWebView::QtWebView(QWidget* parent) : QWebView(parent), fontSizeIsMinimal(fals void QtWebView::keyPressEvent(QKeyEvent* event) { Qt::KeyboardModifiers modifiers = event->modifiers(); int key = event->key(); - if (event->matches(QKeySequence::ZoomIn)) { + if (event->matches(QKeySequence::ZoomIn) || (key == Qt::Key_Equal && (modifiers & Qt::ControlModifier))) { event->accept(); emit fontGrowRequested(); return; } - if (event->matches(QKeySequence::ZoomOut)) { + if (event->matches(QKeySequence::ZoomOut) || (key == Qt::Key_Minus && (modifiers & Qt::ControlModifier))) { event->accept(); emit fontShrinkRequested(); return; |