mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 05:38:12 +08:00
Fix blurry overlay rendering when the pixel display ratio isn't 100% (#2204)
* support hi dpi overlay rendering * Code review and make scaling ratio dynamic --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
9954e49530
commit
33ac141fb8
@@ -352,6 +352,13 @@ impl EditorHandle {
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
/// Inform the overlays system of the current device pixel ratio
|
||||
#[wasm_bindgen(js_name = setDevicePixelRatio)]
|
||||
pub fn set_device_pixel_ratio(&self, ratio: f64) {
|
||||
let message = OverlaysMessage::SetDevicePixelRatio { ratio };
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
/// Mouse movement within the screenspace bounds of the viewport
|
||||
#[wasm_bindgen(js_name = onMouseMove)]
|
||||
pub fn on_mouse_move(&self, x: f64, y: f64, mouse_keys: u8, modifiers: u8) {
|
||||
|
||||
Reference in New Issue
Block a user