File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " iced_native"
3
- version = " 0.9.0 "
3
+ version = " 0.9.1 "
4
4
authors = [
" Héctor Ramón Jiménez <[email protected] >" ]
5
5
edition = " 2021"
6
6
description = " A renderer-agnostic library for native GUIs"
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ impl Handle {
28
28
pub fn from_pixels (
29
29
width : u32 ,
30
30
height : u32 ,
31
- pixels : impl AsRef < [ u8 ] > + Clone + Send + Sync + ' static ,
31
+ pixels : impl AsRef < [ u8 ] > + Send + Sync + ' static ,
32
32
) -> Handle {
33
33
Self :: from_data ( Data :: Rgba {
34
34
width,
@@ -44,7 +44,7 @@ impl Handle {
44
44
/// This is useful if you already have your image loaded in-memory, maybe
45
45
/// because you downloaded or generated it procedurally.
46
46
pub fn from_memory (
47
- bytes : impl AsRef < [ u8 ] > + Clone + Send + Sync + ' static ,
47
+ bytes : impl AsRef < [ u8 ] > + Send + Sync + ' static ,
48
48
) -> Handle {
49
49
Self :: from_data ( Data :: Bytes ( Bytes :: new ( bytes) ) )
50
50
}
@@ -93,7 +93,7 @@ pub struct Bytes(Arc<dyn AsRef<[u8]> + Send + Sync + 'static>);
93
93
94
94
impl Bytes {
95
95
/// Creates new [`Bytes`] around `data`.
96
- pub fn new ( data : impl AsRef < [ u8 ] > + Clone + Send + Sync + ' static ) -> Self {
96
+ pub fn new ( data : impl AsRef < [ u8 ] > + Send + Sync + ' static ) -> Self {
97
97
Self ( Arc :: new ( data) )
98
98
}
99
99
}
Original file line number Diff line number Diff line change @@ -440,12 +440,13 @@ where
440
440
overlay. layout ( renderer, self . bounds , Vector :: ZERO )
441
441
} ) ;
442
442
443
- let new_cursor_position =
444
- if overlay_layout. bounds ( ) . contains ( cursor_position) {
445
- Point :: new ( -1.0 , -1.0 )
446
- } else {
447
- cursor_position
448
- } ;
443
+ let new_cursor_position = if overlay
444
+ . is_over ( Layout :: new ( & overlay_layout) , cursor_position)
445
+ {
446
+ Point :: new ( -1.0 , -1.0 )
447
+ } else {
448
+ cursor_position
449
+ } ;
449
450
450
451
self . overlay = Some ( overlay_layout) ;
451
452
You can’t perform that action at this time.
0 commit comments