mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 15:28:11 +08:00
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:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user