mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
UI/Qt: Do not multiply window position/size by the device pixel ratio
On macOS, this is resulting in values of window.screenX, window.screenY, window.outerWidth and window.outerHeight that are 2x larger than Safari, Firefox, and our AppKit UI.
This commit is contained in:
parent
00a486d072
commit
54f6db01af
Notes:
github-actions[bot]
2024-10-29 11:05:04 +00:00
Author: https://github.com/trflynn89
Commit: 54f6db01af
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2028
Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 2 additions and 2 deletions
|
@ -1168,7 +1168,7 @@ void BrowserWindow::resizeEvent(QResizeEvent* event)
|
|||
QWidget::resizeEvent(event);
|
||||
|
||||
for_each_tab([&](auto& tab) {
|
||||
tab.view().set_window_size({ frameSize().width() * m_device_pixel_ratio, frameSize().height() * m_device_pixel_ratio });
|
||||
tab.view().set_window_size({ frameSize().width(), frameSize().height() });
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1177,7 +1177,7 @@ void BrowserWindow::moveEvent(QMoveEvent* event)
|
|||
QWidget::moveEvent(event);
|
||||
|
||||
for_each_tab([&](auto& tab) {
|
||||
tab.view().set_window_position({ event->pos().x() * m_device_pixel_ratio, event->pos().y() * m_device_pixel_ratio });
|
||||
tab.view().set_window_position({ event->pos().x(), event->pos().y() });
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue