refactor!(app): rename set_title to set_window_title

This commit is contained in:
Michael Aaron Murphy 2023-10-12 13:54:08 +02:00 committed by Michael Murphy
parent 32eafb0c48
commit 395a90891d
4 changed files with 41 additions and 41 deletions

View file

@ -240,7 +240,7 @@ pub trait ApplicationExt: Application {
}
/// Set the title of the main window.
fn set_title(&mut self, title: String) -> iced::Command<Message<Self::Message>>;
fn set_window_title(&mut self, title: String) -> iced::Command<Message<Self::Message>>;
/// View template for the main window.
fn view_main(&self) -> Element<Message<Self::Message>>;
@ -264,13 +264,13 @@ impl<App: Application> ApplicationExt for App {
}
#[cfg(feature = "wayland")]
fn set_title(&mut self, title: String) -> iced::Command<Message<Self::Message>> {
fn set_window_title(&mut self, title: String) -> iced::Command<Message<Self::Message>> {
self.core_mut().title = title.clone();
command::set_title(title)
}
#[cfg(not(feature = "wayland"))]
fn set_title(&mut self, title: String) -> iced::Command<Message<Self::Message>> {
fn set_window_title(&mut self, title: String) -> iced::Command<Message<Self::Message>> {
self.core_mut().title = title.clone();
iced::Command::none()
}