Skip to content

fix(ui): default widget will be correctly highlighted when entering the settings page#2653

Merged
Him188 merged 1 commit intoopen-ani:mainfrom
sukurajima-mai:fix/settings-default-tab
Nov 6, 2025
Merged

fix(ui): default widget will be correctly highlighted when entering the settings page#2653
Him188 merged 1 commit intoopen-ani:mainfrom
sukurajima-mai:fix/settings-default-tab

Conversation

@sukurajima-mai
Copy link
Copy Markdown
Contributor

What
Added a flag to ensure the "Appearance" settings tab is automatically selected and highlighted in wide-screen (list-detail) layout when entering the settings screen without a specified initial tab.

Why
Previously, in wide-screen mode, the settings screen would display the first tab’s content by default but failed to visually highlight it in the navigation rail, leading to a mismatch between the displayed content and the selected UI state. This occurred because the initial selection logic didn’t account for layout context when no initialTab was provided. Users saw the Appearance (or first) tab content but with no navigation item highlighted, causing confusion.

Where
SettingsScreen.kt: Introduced early calculation of layoutParameters and updated the lastSelectedTab initialization logic to default to SettingsTab.APPEARANCE in list-detail (non-single-pane) layouts when initialTab is null.

Close
#2652

@Him188 Him188 enabled auto-merge (squash) November 4, 2025 02:50
@sukurajima-mai
Copy link
Copy Markdown
Contributor Author

macOS的build怎么自动取消了👀

@Him188 Him188 disabled auto-merge November 6, 2025 12:07
@Him188 Him188 merged commit f8d514c into open-ani:main Nov 6, 2025
10 of 11 checks passed
@Him188 Him188 modified the milestones: 5.1.0, 5.2.0 Nov 6, 2025
@StageGuard
Copy link
Copy Markdown
Member

这个 pr 有严重的 bug,更改主题设置后会重置页面状态。
我先 revert 这个 commit,稍后你可以考虑重新 pr

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