From bce7509e870231ff2daca9f6e49198784041d0b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 19 Sep 2022 18:09:26 +0200 Subject: [PATCH] python: expose also platform.*.Application.dpi_scaling. For some reason only window and framebuffer size was exposed but not this. Made DPI-aware calculations impossible to do. --- doc/python/pages/changelog.rst | 2 ++ src/python/magnum/platform/application.h | 1 + 2 files changed, 3 insertions(+) diff --git a/doc/python/pages/changelog.rst b/doc/python/pages/changelog.rst index 7657149..992d6ac 100644 --- a/doc/python/pages/changelog.rst +++ b/doc/python/pages/changelog.rst @@ -96,6 +96,8 @@ Changelog to make the window resizable on startup - Exposed :ref:`platform.sdl2.Application.exit_event` and :ref:`platform.glfw.Application.exit_event` +- Exposed :ref:`platform.sdl2.Application.dpi_scaling` and + :ref:`platform.glfw.Application.dpi_scaling` - Exposed :ref:`platform.glfw.Application.swap_interval` and :ref:`platform.glfw.Application.main_loop_iteration` - Exposed a basic interface of :ref:`trade.AbstractImageConverter` and diff --git a/src/python/magnum/platform/application.h b/src/python/magnum/platform/application.h index ad3ffb7..ac7649d 100644 --- a/src/python/magnum/platform/application.h +++ b/src/python/magnum/platform/application.h @@ -85,6 +85,7 @@ template void application(py::class_(&T::dpiScaling), "DPI scaling") /* Event handlers */ .def("exit_event", &T::exitEvent, "Exit event") .def("viewport_event", &T::viewportEvent, "Viewport event")