Skip to content

Commit 8ce32e7

Browse files
authored
feat(core): expose default_window_icon on App and AppHandle (#6986)
1 parent 2344aea commit 8ce32e7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changes/default-window-icon.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Add `default_window_icon` getter on `App` and `AppHandle`.

core/tauri/src/app.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::{
2323
sealed::{ManagerBase, RuntimeOrDispatch},
2424
utils::config::Config,
2525
utils::{assets::Assets, Env},
26-
Context, DeviceEventFilter, EventLoopMessage, Invoke, InvokeError, InvokeResponse, Manager,
26+
Context, DeviceEventFilter, EventLoopMessage, Icon, Invoke, InvokeError, InvokeResponse, Manager,
2727
Runtime, Scopes, StateManager, Theme, Window,
2828
};
2929

@@ -570,6 +570,11 @@ macro_rules! shared_app_impl {
570570
}
571571
}
572572

573+
/// Returns the default window icon.
574+
pub fn default_window_icon(&self) -> Option<&Icon> {
575+
self.manager.inner.default_window_icon.as_ref()
576+
}
577+
573578
/// Shows the application, but does not automatically focus it.
574579
#[cfg(target_os = "macos")]
575580
pub fn show(&self) -> crate::Result<()> {

0 commit comments

Comments
 (0)