mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
WebView: Fix zoom shortcuts with +/-/0 on numeric block
This commit is contained in:
parent
fba9900775
commit
5d99f53fb8
@ -1401,6 +1401,45 @@ void WebView::keyPressEvent(QKeyEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
switch (eventKey) {
|
||||
case Qt::Key_ZoomIn:
|
||||
zoomIn();
|
||||
event->accept();
|
||||
return;
|
||||
|
||||
case Qt::Key_ZoomOut:
|
||||
zoomOut();
|
||||
event->accept();
|
||||
return;
|
||||
|
||||
case Qt::Key_Plus:
|
||||
if (event->modifiers() & Qt::ControlModifier) {
|
||||
zoomIn();
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case Qt::Key_Minus:
|
||||
if (event->modifiers() & Qt::ControlModifier) {
|
||||
zoomOut();
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case Qt::Key_0:
|
||||
if (event->modifiers() & Qt::ControlModifier) {
|
||||
zoomReset();
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Text navigation is handled automatically in editable elements
|
||||
const QString js = QSL("document.activeElement.contentEditable==='true'||typeof document.activeElement.value != 'undefined'");
|
||||
QWebFrame* frame = page()->currentFrame();
|
||||
|
Loading…
Reference in New Issue
Block a user