summaryrefslogtreecommitdiffstats
path: root/runtime/src/window.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-07-06 06:41:28 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-07-06 06:41:28 +0200
commitcc32bd4de09ee58c15d1b3f2cec4a79dc65dd035 (patch)
tree6b7494f453834a155596daf5c6e885fec44302e8 /runtime/src/window.rs
parentb394c84b37eacb266d45663d5d6626f1b616af7e (diff)
downloadiced-cc32bd4de09ee58c15d1b3f2cec4a79dc65dd035.tar.gz
iced-cc32bd4de09ee58c15d1b3f2cec4a79dc65dd035.tar.bz2
iced-cc32bd4de09ee58c15d1b3f2cec4a79dc65dd035.zip
Use `Size` in both `Resize` and `FetchSize` window actions
Diffstat (limited to 'runtime/src/window.rs')
-rw-r--r--runtime/src/window.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/src/window.rs b/runtime/src/window.rs
index d4111293..094a713d 100644
--- a/runtime/src/window.rs
+++ b/runtime/src/window.rs
@@ -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.