Skip to content

fix(theme): apply user theme accent color to MaterialSwitches (#17158) - #17986

Open
rack0911 wants to merge 1 commit into
nextcloud:masterfrom
rack0911:fix/17158-theme-material-switches
Open

rack0911 wants to merge 1 commit into
nextcloud:masterfrom
rack0911:fix/17158-theme-material-switches

Conversation

@rack0911

@rack0911 rack0911 commented Nov 7, 2026

Copy link
Copy Markdown

Resolves #17158.

Summary

Following the migration from SwitchCompat to Material 3 MaterialSwitch, several screens continued invoking viewThemeUtils.androidx.colorSwitchCompat(...). Because colorSwitchCompat does not apply Material 3 switch color states, toggles in Contacts/Calendar backup, file sharing, and synced folder settings fell back to default system tints rather than adopting the user's theme accent color.

This PR updates these screens to invoke viewThemeUtils.material.colorMaterialSwitch(...).

Changes

  • BackupFragment.kt: Update contacts, calendar, and dailyBackup toggles to use viewThemeUtils.material.colorMaterialSwitch(...).
  • FileDetailsSharingProcessFragment.kt: Update shareProcessSetPasswordSwitch, shareProcessSetExpDateSwitch, shareProcessSetDownloadLimitSwitch, shareProcessHideDownloadCheckbox, and shareProcessChangeNameSwitch to use viewThemeUtils.material.colorMaterialSwitch(...).
  • SyncedFolderPreferencesDialogFragment.kt: Update syncEnabled switch to use viewThemeUtils.material.colorMaterialSwitch(...).

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed (UI styling fix)
  • 🔙 Backport requests are created or not needed
  • 🌸 PR title is meaningful

…oud#17158)

Signed-off-by: rack0911 <232092783+rack0911@users.noreply.github.com>
@rack0911
rack0911 force-pushed the fix/17158-theme-material-switches branch from 40c9c10 to 239695f Compare November 7, 2026 01:43

This branch has not been deployed

No deployments
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.

UI Color Inconsistency: Five UI Elements Not Following Theme Accent Color.

1 participant