diff --git a/CHANGES.rst b/CHANGES.rst index 5af0d3a..f157553 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,7 @@ Changes 0.3.0.dev --------- +- Fix dark mode alert style #137 - Notifications: fixes, cleanup, and tests #131 - Fix slider for some older macOS versions (10.11 and before?) - Keyboard interrupts now stop a running application diff --git a/rumps/rumps.py b/rumps/rumps.py index 77a56df..d8f8404 100644 --- a/rumps/rumps.py +++ b/rumps/rumps.py @@ -75,6 +75,7 @@ def alert(title=None, message='', ok=None, cancel=None, other=None, icon_path=No cancel = 'Cancel' if cancel else None alert = NSAlert.alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_( title, ok, cancel, other, message) + alert.window().setAppearance_(AppKit.NSAppearance.currentAppearance()) alert.setAlertStyle_(0) # informational style if icon_path is not None: icon = _nsimage_from_file(icon_path) @@ -846,6 +847,7 @@ def run(self): :return: a :class:`rumps.rumps.Response` object that contains the text and the button clicked as an integer. """ _log(self) + self._alert.window().setAppearance_(AppKit.NSAppearance.currentAppearance()) clicked = self._alert.runModal() % 999 if clicked > 2 and self._cancel: clicked -= 1