Skip to content

Honor dark mode from settings#175

Merged
Goooler merged 1 commit into
trunkfrom
honor-color-themes
May 1, 2026
Merged

Honor dark mode from settings#175
Goooler merged 1 commit into
trunkfrom
honor-color-themes

Conversation

@Goooler
Copy link
Copy Markdown
Owner

@Goooler Goooler commented May 1, 2026

No description provided.

This comment was marked as resolved.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the app theming pipeline so UI dark mode can be driven by the user’s in-app setting (Force Dark / Force Light / Auto) rather than only the system theme, and aligns system bar appearance accordingly.

Changes:

  • Read UiStore.darkMode inside MihomoTheme to choose dark/light color tokens.
  • Recreate the Activity after dark mode setting changes so the theme picks up the new preference immediately.
  • Configure enableEdgeToEdge() system bar styling based on the selected dark mode setting.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
app/src/main/kotlin/com/github/kr328/clash/ui/theme/Theme.kt Derives darkTheme from UiStore.darkMode (with Auto falling back to system).
app/src/main/kotlin/com/github/kr328/clash/settings/ui/AppSettingsScreen.kt Recreates the current Activity after updating dark mode.
app/src/main/kotlin/com/github/kr328/clash/MainActivity.kt Sets edge-to-edge system bar style according to the configured dark mode.

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

Comment thread app/src/main/kotlin/com/github/kr328/clash/MainActivity.kt
@Goooler Goooler force-pushed the honor-color-themes branch from b737b20 to b0c4790 Compare May 1, 2026 08:12
@Goooler Goooler merged commit 22a2377 into trunk May 1, 2026
3 checks passed
@Goooler Goooler deleted the honor-color-themes branch May 1, 2026 08:18
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