Fix HiDPI vs. set_cursor_icon for web (#1652)
PhysicalSize is recorded as canvas.size, whereas LogicalSize is stored as canvas.style.size. The previous cursor behavior on stdweb clobbered all style - thus losing the LogicalSize.
This commit is contained in:
parent
412bd94ea4
commit
9c72cc2a98
5 changed files with 16 additions and 11 deletions
|
|
@ -165,8 +165,7 @@ impl Window {
|
|||
CursorIcon::RowResize => "row-resize",
|
||||
};
|
||||
*self.previous_pointer.borrow_mut() = text;
|
||||
self.canvas
|
||||
.set_attribute("style", &format!("cursor: {}", text));
|
||||
backend::set_canvas_style_property(self.canvas.raw(), "cursor", text);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue