Skip to content

[Bug] Volume slider color does not update when switching themes #53

@BegoniaHe

Description

@BegoniaHe

Bug Description

When switching theme colors, the volume slider in the bottom-right corner of the interface does not update to reflect the new theme color. The slider maintains its default color instead of applying the new theme's primaryColor.

Image

Steps to Reproduce

  1. Open HiFidelity
  2. Go to Settings → Appearance/Theme
  3. Switch to a different theme color scheme
  4. Observe the volume slider in the bottom-right corner
  5. Slider color remains unchanged despite theme switch

Expected Behavior

The volume slider should immediately adopt the new theme's primary color when switching themes, maintaining visual consistency with the rest of the application.

Image

Severity

Bug - Unexpected behavior but app runs

HiFidelity Version

1.0.9

macOS Version

macOS 15 (Sequoia)

Mac Model

MacBook Air 13-inch, M4, 2025

Additional Context

Root Cause

The issue is located in VolumeControlSection.swift at line 28:

.accentColor(theme.currentTheme.primaryColor)

In SwiftUI, the .accentColor() modifier has been deprecated in favor of .tint(). While .accentColor() still works with Slider components, Apple recommends using .tint() for better compatibility and future-proofing. The .tint() modifier should be used to control the color of interactive controls like sliders.

Proposed Fix

Change line 28 to:

.tint(theme.currentTheme.primaryColor)

This issue only affects the visual appearance of the volume slider; volume control functionality works correctly
Other UI components properly update with theme changes
.tint() is the recommended SwiftUI approach for controlling the color of interactive controls like sliders.

You can see code VolumeControlSection.swift from Fork at line 29 as reference

Logs & Crash Reports

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions