fix(ui): AMOLED theme container fix and hardcoded color cleanup#3596
Merged
Conversation
The amoledBackground() extension was setting surfaceContainerLowest, surfaceContainerLow, and surfaceContainer to Color.Black, but omitted surfaceContainerHigh and surfaceContainerHighest. This caused higher-elevation surface containers to retain their dynamic colors in AMOLED mode, creating an inconsistent appearance on true-black AMOLED devices. Signed-off-by: EasyGuo114514 <2025520491@qq.com>
WarningCard used hardcoded Color(0XFF310808), Color(0xFFF8E2E2) for background and Color(0xFFF72727) for text in non-dynamic-color mode. These values bypass the theme system entirely and look inconsistent. Replace them with colorScheme.errorContainer and colorScheme.error which adapt to the current theme's error color palette while still providing appropriate warning/error visual semantics. Signed-off-by: EasyGuo114514 <2025520491@qq.com>
The sulog enable button used hardcoded Color(0xFFF72727) in non-dynamic-color mode. Use colorScheme.error for proper theme integration across all color schemes. Signed-off-by: EasyGuo114514 <2025520491@qq.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request improves the Android Manager (MIUIX UI path) theme consistency by completing the AMOLED surface container overrides and removing a few remaining hardcoded error-related colors in UI components.
Changes:
- Extend AMOLED theme overrides to include
surfaceContainerHighandsurfaceContainerHighestso elevated containers also become true black. - Replace
WarningCardhardcoded background/text colors with theme-drivenerrorContainer/errorcolors. - Replace a hardcoded red fallback color in the SU log “Enable” button with
colorScheme.error.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| manager/app/src/main/java/me/weishu/kernelsu/ui/theme/ThemeExt.kt | Completes AMOLED overrides for higher elevation surface containers to avoid mixed container colors in AMOLED mode. |
| manager/app/src/main/java/me/weishu/kernelsu/ui/component/miuix/WarningCard.kt | Removes hardcoded warning/error colors in favor of theme-derived error colors. |
| manager/app/src/main/java/me/weishu/kernelsu/ui/screen/sulog/SulogMiuix.kt | Replaces a hardcoded red fallback with colorScheme.error for better palette consistency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
其实硬编码的颜色是我主动选的,不过也无所谓了 |
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
Details
1. AMOLED background incomplete surface container list
\ set , , and \ to , but omitted \ and . Higher-elevation surface containers retained their dynamic colors in AMOLED mode, creating visual inconsistency on true-black AMOLED devices.
2. WarningCard hardcoded colors
Three hex color values (, , ) bypassed the dynamic and static theme system entirely. Replaced with \ and \ which adapt to the current palette's error color scheme.
3. SulogMiuix enable button hardcoded color
The SU log enable button used \colorScheme.error`.
Changed files
Generated with Claude Code