Skip to content

fix(ui): AMOLED theme container fix and hardcoded color cleanup#3596

Merged
YuKongA merged 3 commits into
tiann:mainfrom
EasyGuo114514:fix/ui-theme-bugs
Jul 26, 2026
Merged

fix(ui): AMOLED theme container fix and hardcoded color cleanup#3596
YuKongA merged 3 commits into
tiann:mainfrom
EasyGuo114514:fix/ui-theme-bugs

Conversation

@EasyGuo114514

@EasyGuo114514 EasyGuo114514 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix AMOLED dark mode missing \ and \ in ThemeExt.kt
  • Replace hardcoded colors with theme colors in WarningCard
  • Replace hardcoded color with theme error color in SulogMiuix

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

  • manager/.../ui/theme/ThemeExt.kt
  • manager/.../ui/component/miuix/WarningCard.kt
  • manager/.../ui/screen/sulog/SulogMiuix.kt

Generated with Claude Code

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>

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 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 surfaceContainerHigh and surfaceContainerHighest so elevated containers also become true black.
  • Replace WarningCard hardcoded background/text colors with theme-driven errorContainer / error colors.
  • 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.

@5ec1cff
5ec1cff requested a review from YuKongA July 24, 2026 02:10
@YuKongA
YuKongA merged commit d1b9f15 into tiann:main Jul 26, 2026
18 checks passed
@YuKongA

YuKongA commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

其实硬编码的颜色是我主动选的,不过也无所谓了

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.

3 participants