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

@rack0911
rack0911 force-pushed the fix/17158-theme-material-switches branch from 40c9c10 to 239695f Compare November 7, 2026 01:43
@github-actions

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

…oud#17158)

Signed-off-by: rack0911 <232092783+rack0911@users.noreply.github.com>
@rack0911
rack0911 force-pushed the fix/17158-theme-material-switches branch from 239695f to 65d5993 Compare November 22, 2026 03:48

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

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