Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Dec 28, 2022
1 parent 38e89e9 commit a9db8cf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/update-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"window-shadows": "patch"
---

Update docs to include conditional compliation flags.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Add native shadows to your windows.
```rs
use window_shadows::set_shadow;

set_shadow(&window, true).expect("Unsupported platform!");
#[cfg(any(windows, target_os = "macos"))]
set_shadow(&window, true).unwrap();
```

## Screenshots
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
//! use window_shadows::set_shadow;
//!
//! # let window: &dyn raw_window_handle::HasRawWindowHandle = unsafe { std::mem::zeroed() };
//! set_shadow(&window, true).expect("Unsupported platform!");
//! #[cfg(any(windows, target_os = "macos"))]
//! set_shadow(&window, true).unwrap();
//! ```
/// Enables or disables the shadows for a window.
Expand Down

0 comments on commit a9db8cf

Please sign in to comment.