mirror of
https://github.com/yattee/yattee.git
synced 2026-10-30 08:27:17 +00:00
Fix player brightness controls on iPhone Duo
Brightness controls used UIScreen.main, which on iPhone Duo can be a different display than the one hosting the player. Route all brightness reads and writes through PlayerBrightness, which targets the screen of the window hosting the controls.
This commit is contained in:
@@ -460,7 +460,7 @@ struct ControlsSectionRenderer: View {
|
||||
|
||||
/// Brightness icon image using variable value SF Symbol.
|
||||
private var brightnessImage: Image {
|
||||
Image(systemName: "sun.max.fill", variableValue: UIScreen.main.brightness)
|
||||
Image(systemName: "sun.max.fill", variableValue: PlayerBrightness.value(for: actions.screen))
|
||||
}
|
||||
|
||||
/// Panel toggle button content with glass background support.
|
||||
@@ -796,9 +796,9 @@ struct ControlsSectionRenderer: View {
|
||||
if effectiveBehavior == .alwaysVisible || isBrightnessExpanded {
|
||||
Slider(
|
||||
value: Binding(
|
||||
get: { UIScreen.main.brightness },
|
||||
get: { PlayerBrightness.value(for: actions.screen) },
|
||||
set: { newValue in
|
||||
UIScreen.main.brightness = newValue
|
||||
PlayerBrightness.set(newValue, for: actions.screen)
|
||||
}
|
||||
),
|
||||
in: 0...1,
|
||||
|
||||
Reference in New Issue
Block a user