Conversation
Reviewer's GuideThe PR fixes dark-mode handling for duplicate-instance dialogs by applying the theme and MessageBox patches before the dialog is shown, with idempotent patch initialization. It also changes ImageViewer SVG/image previews to follow the system theme when LastTheme is unset or None, and aligns the configuration documentation with that behavior. Sequence diagram for themed duplicate-instance dialogsequenceDiagram
participant App as QuickLookApp
participant ThemeManager
participant OSThemeHelper
participant MessageBoxPatcher
participant MessageBox
App->>App: EnsureFirstInstance(args)
App->>ThemeManager: Apply(OSThemeHelper.AppsUseDarkTheme())
App->>MessageBoxPatcher: Initialize()
alt patcher already initialized
MessageBoxPatcher-->>App: return
else first initialization
MessageBoxPatcher-->>App: apply Harmony patches
end
App->>MessageBox: Show(duplicate instance notification)
MessageBox-->>App: OK
Flow diagram for system-based ImageViewer preview themeflowchart TD
A[Prepare or TryPrepare preview] --> B[Read LastTheme]
B --> C{LastTheme is None or unset?}
C -->|Yes| D["OSThemeHelper.AppsUseDarkTheme()"]
C -->|No| E[Use configured LastTheme]
D --> F[Set context.Theme to Dark or Light]
E --> F
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Brief Description of Changes
Summary by Sourcery
Fix theme initialization for duplicate-instance dialogs and default image previews to the operating system theme.
Bug Fixes:
Enhancements:
Documentation: