Produce window::Event::Resized in iced_winit
				
					
				
			This commit is contained in:
		
							parent
							
								
									7ab6ed7ef9
								
							
						
					
					
						commit
						d15d1156bd
					
				@ -2,8 +2,8 @@ use crate::{
 | 
				
			|||||||
    container, conversion,
 | 
					    container, conversion,
 | 
				
			||||||
    input::{keyboard, mouse},
 | 
					    input::{keyboard, mouse},
 | 
				
			||||||
    renderer::{Target, Windowed},
 | 
					    renderer::{Target, Windowed},
 | 
				
			||||||
    subscription, Cache, Clipboard, Command, Container, Debug, Element, Event,
 | 
					    subscription, window, Cache, Clipboard, Command, Container, Debug, Element,
 | 
				
			||||||
    Length, MouseCursor, Settings, Subscription, UserInterface,
 | 
					    Event, Length, MouseCursor, Settings, Subscription, UserInterface,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// An interactive, native cross-platform application.
 | 
					/// An interactive, native cross-platform application.
 | 
				
			||||||
@ -373,10 +373,13 @@ pub trait Application: Sized {
 | 
				
			|||||||
                    *control_flow = ControlFlow::Exit;
 | 
					                    *control_flow = ControlFlow::Exit;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                WindowEvent::Resized(new_size) => {
 | 
					                WindowEvent::Resized(new_size) => {
 | 
				
			||||||
 | 
					                    events.push(Event::Window(window::Event::Resized {
 | 
				
			||||||
 | 
					                        width: new_size.width.round() as u32,
 | 
				
			||||||
 | 
					                        height: new_size.height.round() as u32,
 | 
				
			||||||
 | 
					                    }));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    size = new_size;
 | 
					                    size = new_size;
 | 
				
			||||||
                    resized = true;
 | 
					                    resized = true;
 | 
				
			||||||
 | 
					 | 
				
			||||||
                    log::debug!("Resized: {:?}", new_size);
 | 
					 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                _ => {}
 | 
					                _ => {}
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user