Skip to content

Fix appearanceDidChange for Quick Look#1495

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Jun 17, 2026
Merged

Fix appearanceDidChange for Quick Look#1495
cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates how MarkEdit updates the shared UserDefaults.forcedColorScheme used by the Quick Look extension, ensuring the override is only applied while the app is active (avoiding stale forced appearance when MarkEdit is in the background).

Changes:

  • Add observers for NSApplication.didBecomeActiveNotification / didResignActiveNotification during the open panel lifecycle to re-apply or clear the forced color scheme.
  • Extend appearanceDidChange to accept an isAppActive parameter (defaulting to NSApp.isActive) and reset to .system when inactive.
  • Ensure observers are removed and the KVO observation invalidated via defer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cyanzhong cyanzhong merged commit 9236e7f into main Jun 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants