Merged in iced master

This commit is contained in:
Bingus 2023-02-15 14:56:15 -08:00
parent 63fb608d8b
commit 3c095aa3f0
No known key found for this signature in database
GPG key ID: 5F84D2AA40A9F170
4 changed files with 5 additions and 5 deletions

View file

@ -901,7 +901,7 @@ pub fn run_command<A, E>(
y, y,
}); });
} }
window::Action::SetMode(mode) => { window::Action::ChangeMode(mode) => {
let window = windows.get(&id).expect("No window found"); let window = windows.get(&id).expect("No window found");
window.set_visible(conversion::visible(mode)); window.set_visible(conversion::visible(mode));
window.set_fullscreen(conversion::fullscreen( window.set_fullscreen(conversion::fullscreen(

View file

@ -1,4 +1,4 @@
use crate::window::{Mode, UserAttention}; use crate::window::{Mode, UserAttention, Settings};
use iced_futures::MaybeSend; use iced_futures::MaybeSend;
use std::fmt; use std::fmt;
@ -16,7 +16,7 @@ pub enum Action<T> {
/// Spawns a new window with the provided [`window::Settings`]. /// Spawns a new window with the provided [`window::Settings`].
Spawn { Spawn {
/// The settings of the [`Window`]. /// The settings of the [`Window`].
settings: window::Settings, settings: Settings,
}, },
/// Resize the window. /// Resize the window.
Resize { Resize {

View file

@ -957,7 +957,7 @@ pub fn run_command<A, E>(
y, y,
}); });
} }
window::Action::SetMode(mode) => { window::Action::ChangeMode(mode) => {
let window = windows.get(&id).expect("No window found"); let window = windows.get(&id).expect("No window found");
window.set_visible(conversion::visible(mode)); window.set_visible(conversion::visible(mode));
window.set_fullscreen(conversion::fullscreen( window.set_fullscreen(conversion::fullscreen(

View file

@ -60,7 +60,7 @@ pub fn move_to<Message>(id: window::Id, x: i32, y: i32) -> Command<Message> {
/// Changes the [`Mode`] of the window. /// Changes the [`Mode`] of the window.
pub fn change_mode<Message>(id: window::Id, mode: Mode) -> Command<Message> { pub fn change_mode<Message>(id: window::Id, mode: Mode) -> Command<Message> {
Command::single(command::Action::Window(id, window::Action::SetMode(mode))) Command::single(command::Action::Window(id, window::Action::ChangeMode(mode)))
} }
/// Fetches the current [`Mode`] of the window. /// Fetches the current [`Mode`] of the window.