Desktop: Add support for UI scaling (#3310)

* desktop support ui scaling

* fix some warnings

* use browser zoom if needed

* fix infinite footprint size

* fix web canvas scale

* always set zoom

* use only zoom for scaling

* prevent user zoom

* remove mouse position scaling
This commit is contained in:
Timon
2025-11-08 12:32:04 +01:00
committed by GitHub
parent 7254c470ef
commit f02f834097
25 changed files with 286 additions and 162 deletions
+2 -2
View File
@@ -12,14 +12,14 @@ use super::consts::{MULTICLICK_ALLOWED_TRAVEL, MULTICLICK_TIMEOUT, PINCH_ZOOM_SP
pub(crate) fn handle_window_event(browser: &Browser, input_state: &mut InputState, event: &WindowEvent) {
match event {
WindowEvent::PointerMoved { position, .. } | WindowEvent::PointerEntered { position, .. } => {
input_state.cursor_move(position);
input_state.cursor_move(&position);
let Some(host) = browser.host() else { return };
host.send_mouse_move_event(Some(&input_state.into()), 0);
}
WindowEvent::PointerLeft { position, .. } => {
if let Some(position) = position {
input_state.cursor_move(position);
input_state.cursor_move(&position);
}
let Some(host) = browser.host() else { return };