Fix inactive Modal title bar contrast - #16434
Open
anuagragith wants to merge 2 commits into
Open
Conversation
added 2 commits
September 8, 2026 14:32
Use theme-aware AppWindowTitleBar colors for active and inactive Modal caption states while preserving true window activation and runtime theme updates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8f4dac7d-4a14-4053-bd3b-a7cda2967006
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The newly inherited theme must be applied immediately when remounting an existing Modal.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fixes inactive native Modal title-bar contrast while preserving activation state and theme behavior.
Changes:
- Adds theme-aware title-bar and caption-button colors.
- Handles runtime theme changes and queued updates.
- Adds a prerelease change record.
File summaries
| File | Description |
|---|---|
vnext/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp |
Implements title-bar theming; remounts may retain stale colors until another theme event. |
change/react-native-windows-580ee5e2-c630-4ce8-a1a3-14ee5a18a571.json |
Records the Modal contrast fix. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+208
to
+210
| m_themeSource = winrt::make_weak(themeSource); | ||
| m_theme = themeSource.Theme(); | ||
| const auto themeSubscriptionGeneration = m_themeSubscriptionGeneration; |
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.
Summary
Fixes ADO 63976889, where a native Modal title and close button had insufficient contrast after the Modal window became inactive.
Root cause
RNW PR #16108 introduced title-bar and DWM state resetting for Modal windows. The restored default inactive caption colors caused the title and close button to become difficult to read.
The previous attempted fix forced
WM_NCACTIVATEto render the window as active. That incorrectly represented the window activation state.Fix
AppWindowTitleBaractive, inactive, hover, and pressed colors.Validation
Microsoft Reviewers: Open in CodeFlow