mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
Ladybird: Don't scroll web view if wheel event is a Ctrl+Wheel zoom
This commit is contained in:
parent
bf16618fba
commit
c0a5787395
2 changed files with 11 additions and 0 deletions
|
@ -262,6 +262,16 @@ KeyCode get_keycode_from_qt_keyboard_event(QKeyEvent const& event)
|
|||
return Key_Invalid;
|
||||
}
|
||||
|
||||
void WebContentView::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
if (!event->modifiers().testFlag(Qt::ControlModifier)) {
|
||||
QAbstractScrollArea::wheelEvent(event);
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
event->ignore();
|
||||
}
|
||||
|
||||
void WebContentView::mouseMoveEvent(QMouseEvent* event)
|
||||
{
|
||||
Gfx::IntPoint position(event->position().x() / m_inverse_pixel_scaling_ratio, event->position().y() / m_inverse_pixel_scaling_ratio);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue