Use Size in both Resize and FetchSize window actions
This commit is contained in:
parent
b394c84b37
commit
cc32bd4de0
3 changed files with 15 additions and 18 deletions
|
|
@ -6,6 +6,7 @@ pub use action::Action;
|
|||
use crate::command::{self, Command};
|
||||
use crate::core::time::Instant;
|
||||
use crate::core::window::{Event, Icon, Level, Mode, UserAttention};
|
||||
use crate::core::Size;
|
||||
use crate::futures::subscription::{self, Subscription};
|
||||
|
||||
/// Subscribes to the frames of the window of the running application.
|
||||
|
|
@ -34,8 +35,8 @@ pub fn drag<Message>() -> Command<Message> {
|
|||
}
|
||||
|
||||
/// Resizes the window to the given logical dimensions.
|
||||
pub fn resize<Message>(width: u32, height: u32) -> Command<Message> {
|
||||
Command::single(command::Action::Window(Action::Resize { width, height }))
|
||||
pub fn resize<Message>(new_size: Size<u32>) -> Command<Message> {
|
||||
Command::single(command::Action::Window(Action::Resize(new_size)))
|
||||
}
|
||||
|
||||
/// Maximizes the window.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue