Skip to content

Commit

Permalink
feat(core): expose default_window_icon on App and AppHandle (#6986)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed May 17, 2023
1 parent 2344aea commit 8ce32e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/default-window-icon.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Add `default_window_icon` getter on `App` and `AppHandle`.
7 changes: 6 additions & 1 deletion core/tauri/src/app.rs
Expand Up @@ -23,7 +23,7 @@ use crate::{
sealed::{ManagerBase, RuntimeOrDispatch},
utils::config::Config,
utils::{assets::Assets, Env},
Context, DeviceEventFilter, EventLoopMessage, Invoke, InvokeError, InvokeResponse, Manager,
Context, DeviceEventFilter, EventLoopMessage, Icon, Invoke, InvokeError, InvokeResponse, Manager,
Runtime, Scopes, StateManager, Theme, Window,
};

Expand Down Expand Up @@ -570,6 +570,11 @@ macro_rules! shared_app_impl {
}
}

/// Returns the default window icon.
pub fn default_window_icon(&self) -> Option<&Icon> {
self.manager.inner.default_window_icon.as_ref()
}

/// Shows the application, but does not automatically focus it.
#[cfg(target_os = "macos")]
pub fn show(&self) -> crate::Result<()> {
Expand Down

0 comments on commit 8ce32e7

Please sign in to comment.