title: Using a Toggle to disable a Slider in SwiftUI results in styling problems
body: <p>Using a Toggle to disable/enable a slider is resulting in the styling being inverted until you interact with the Slider. I'm obviously going about this the wrong way!</p>
  <pre><code>struct ContentView: View {
  @State var isActive = true
  @State var value :Double = 2.0
  
  var body: some View {
      VStack {
          Section(header:
              HStack {
                  Toggle(isOn: $isActive)
                      {}.toggleStyle(SwitchToggleStyle(tint: .purple))
              }
          ) {
              HStack {
                  Slider(value: $value, in: 0...4, step: 1)
                      .accentColor(isActive ? .purple : .secondary).disabled(!isActive)
                  }.pickerStyle(SegmentedPickerStyle())
          }
      }
  }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/iEknJ.png" rel="nofollow noreferrer">Initial state</a></p>
  <p><a href="https://i.stack.imgur.com/Y7NaH.png" rel="nofollow noreferrer">Disable the toggle - note the Slider <strong>style</strong> is wrong, but the colour is correct</a></p>
  <p><a href="https://i.stack.imgur.com/TwTiZ.png" rel="nofollow noreferrer">Enable the toggle again - note the Slider style is now disabled, and the colour (purple which is correct) is in the disabled style</a></p>
  <p>If you interact with the re-enabled slider, the styling fixes itself.</p>
  <p>I hope I'm doing something daft here...</p>