mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
Ladybird/Qt: Don't use devicePixelRatio() directly
This commit is contained in:
parent
41a3c19cfe
commit
8b0abb8ded
1 changed files with 2 additions and 2 deletions
|
@ -338,8 +338,8 @@ void WebContentView::wheelEvent(QWheelEvent* event)
|
|||
auto num_degrees = -event->angleDelta();
|
||||
float delta_x = -num_degrees.x() / 120;
|
||||
float delta_y = num_degrees.y() / 120;
|
||||
auto step_x = delta_x * QApplication::wheelScrollLines() * devicePixelRatio();
|
||||
auto step_y = delta_y * QApplication::wheelScrollLines() * devicePixelRatio();
|
||||
auto step_x = delta_x * QApplication::wheelScrollLines() * m_device_pixel_ratio;
|
||||
auto step_y = delta_y * QApplication::wheelScrollLines() * m_device_pixel_ratio;
|
||||
int scroll_step_size = verticalScrollBar()->singleStep();
|
||||
client().async_mouse_wheel(to_content_position(position), screen_position, button, buttons, modifiers, step_x * scroll_step_size, step_y * scroll_step_size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue