mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-29 04:55:40 +03:00
feat(core): expose default_window_icon on App and AppHandle (#6986)
This commit is contained in:
parent
2344aea176
commit
8ce32e74b5
5
.changes/default-window-icon.md
Normal file
5
.changes/default-window-icon.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Add `default_window_icon` getter on `App` and `AppHandle`.
|
@ -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,
|
||||
};
|
||||
|
||||
@ -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<()> {
|
||||
|
Loading…
Reference in New Issue
Block a user