1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:07:45 +00:00

Ladybird/Qt: Listen to DPI changes and update WebContentView accordingly

This commit is contained in:
Bastiaan van der Plaat 2023-12-13 19:10:05 +01:00 committed by Andreas Kling
parent 51ecfdf71f
commit 04b591b2e0
6 changed files with 81 additions and 15 deletions

View file

@ -31,11 +31,17 @@ public:
void select_hovered_node();
void select_default_node();
public slots:
void device_pixel_ratio_changed(qreal dpi);
private:
void closeEvent(QCloseEvent*) override;
QPoint to_widget_position(Gfx::IntPoint) const;
QScreen* m_current_screen;
double m_device_pixel_ratio { 0 };
WebContentView* m_inspector_view;
OwnPtr<WebView::InspectorClient> m_inspector_client;