From 0d150aa9482ac8ed916515927b1de3abf163c998 Mon Sep 17 00:00:00 2001 From: Jared Suttles Date: Sun, 17 May 2020 11:06:45 -0400 Subject: [PATCH 1/2] fix dark mode alert style --- rumps/rumps.py | 2 ++ 1 file changed, 2 insertions(+) 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 From 33a77d610bb0297c761089c6b16706c201736ba1 Mon Sep 17 00:00:00 2001 From: Jared Suttles Date: Fri, 22 May 2020 08:20:20 -0400 Subject: [PATCH 2/2] update CHANGES.rst --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) 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