LadybirdBrowser / ancient-history

The Ladybird web browser
BSD 2-Clause "Simplified" License
1.62k stars 105 forks source link

Apply inverse image scaling to ensure the WebView renders at 1:1 #7

Closed ucosty closed 2 years ago

ucosty commented 2 years ago

On high-dpi systems QT will automatically scale up painting operations. This results in an ugly blurry browser window surrounded by a nicely scaled window frame. This patch applies an inverse scale to the WebView widget, ensuring the painting and mouse events are lined up and draw with a 1:1 pixel ratio with respect to the display's device pixels.