mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
Fix rendering of the Qt platform example with high-dpi
- Provide a C++ platform event for the scale factor change and send it - Report the correct logical and physical sizes to Slint
This commit is contained in:
parent
459f810bd8
commit
dd61890e23
3 changed files with 34 additions and 12 deletions
|
@ -140,6 +140,15 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/// Notifies the platform about a change in the device pixel ratio.
|
||||
void dispatch_scale_factor_change_event(float factor)
|
||||
{
|
||||
private_api::assert_main_thread();
|
||||
if (was_initialized) {
|
||||
cbindgen_private::slint_windowrc_dispatch_scale_factor_change_event(&self, factor);
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns true if the window is currently animating
|
||||
bool has_active_animations() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue