Skip Canvas::draw if bounds have no logical pixels
This commit is contained in:
parent
af7cbf0003
commit
644c1b70ca
1 changed files with 5 additions and 0 deletions
|
|
@ -211,6 +211,11 @@ where
|
|||
use iced_native::Renderer as _;
|
||||
|
||||
let bounds = layout.bounds();
|
||||
|
||||
if bounds.width < 1.0 || bounds.height < 1.0 {
|
||||
return;
|
||||
}
|
||||
|
||||
let translation = Vector::new(bounds.x, bounds.y);
|
||||
let cursor = Cursor::from_window_position(cursor_position);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue