Skip to content

Commit

Permalink
macOS: add makeWindowFullyTransparent
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian-Samoticha committed Dec 4, 2022
1 parent c419fb4 commit 7f33c10
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,26 @@ class Window {
await _kChannel.invokeMethod(_kRemoveMaskImage, {});
}

/// Makes a window fully transparent (with no blur effect) (macOS only).
///
/// This is a convenience method which executes:
/// ```dart
/// setWindowBackgroundColorToClear();
/// makeTitlebarTransparent();
/// addEmptyMaskImage();
/// disableShadow();
/// ```
///
/// **Warning:** When the window is fully transparent, its highlight effect
/// (the thin white line at the top of the window) is still visible. This is
/// considered a bug and may change in a future version.
static Future<void> makeWindowFullyTransparent() async {
setWindowBackgroundColorToClear();
makeTitlebarTransparent();
addEmptyMaskImage();
disableShadow();
}

/// Makes the window ignore mouse events (macOS only).
static Future<void> ignoreMouseEvents() async {
await _kCompleter.future;
Expand Down

0 comments on commit 7f33c10

Please sign in to comment.