Skip to content

Commit

Permalink
impl: requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ahqsoftwares committed Nov 14, 2024
1 parent f986518 commit 2141092
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/tauri/src/webview/webview_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,8 @@ impl<R: Runtime> WebviewWindow<R> {
/// 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<Image<'_>>) -> crate::Result<()> {
self.window.set_overlay_icon(icon)
}
Expand All @@ -1737,6 +1739,8 @@ impl<R: Runtime> WebviewWindow<R> {

/// 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<String>) -> crate::Result<()> {
self.window.set_badge_label(label)
}
Expand Down
4 changes: 4 additions & 0 deletions crates/tauri/src/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Image<'_>>) -> crate::Result<()> {
self
.window
Expand All @@ -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<i64>) -> crate::Result<()> {
self
.window
Expand Down

0 comments on commit 2141092

Please sign in to comment.