diff --git a/crates/tauri/src/webview/webview_window.rs b/crates/tauri/src/webview/webview_window.rs index a4075b97d3ac..8abc23b957dc 100644 --- a/crates/tauri/src/webview/webview_window.rs +++ b/crates/tauri/src/webview/webview_window.rs @@ -1720,6 +1720,8 @@ impl WebviewWindow { /// Setting the icon to None will remove the overlay icon /// /// The overlay icon can be unique for each window. + #[cfg(target_os = "windows")] + #[cfg_attr(docsrs, doc(cfg(target_os = "windows")))] pub fn set_overlay_icon(&self, icon: Option>) -> crate::Result<()> { self.window.set_overlay_icon(icon) } @@ -1737,6 +1739,8 @@ impl WebviewWindow { /// Sets the taskbar badge label **macOS only** /// Setting the label to `0``will remove the badge + #[cfg(target_os = "macos")] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] pub fn set_badge_label(&self, label: Option) -> crate::Result<()> { self.window.set_badge_label(label) } diff --git a/crates/tauri/src/window/mod.rs b/crates/tauri/src/window/mod.rs index 7f04afbc5ad3..d850f012b61f 100644 --- a/crates/tauri/src/window/mod.rs +++ b/crates/tauri/src/window/mod.rs @@ -2018,6 +2018,8 @@ tauri::Builder::default() /// Setting the icon to None will remove the overlay icon /// /// The overlay icon can be unique for each window. + #[cfg(target_os = "windows")] + #[cfg_attr(docsrs, doc(cfg(target_os = "windows")))] pub fn set_overlay_icon(&self, icon: Option>) -> crate::Result<()> { self .window @@ -2033,6 +2035,8 @@ tauri::Builder::default() /// - **Windows:** Unsupported, use [`Window::set_overlay_icon`] instead. /// - **iOS:** iOS expects i32, the value will be clamped to i32::MIN, i32::MAX. /// - **Android:** Unsupported. + #[cfg(target_os = "macos")] + #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] pub fn set_badge_count(&self, count: Option) -> crate::Result<()> { self .window