From c24b561c131415e20aead742deb2472623a9bb5f Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 31 Aug 2022 21:28:25 +0200 Subject: [PATCH] Remove controls thumb --- Shared/Player/Controls/TimelineView.swift | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Shared/Player/Controls/TimelineView.swift b/Shared/Player/Controls/TimelineView.swift index ea4b2245..b613bd30 100644 --- a/Shared/Player/Controls/TimelineView.swift +++ b/Shared/Player/Controls/TimelineView.swift @@ -139,13 +139,13 @@ struct TimelineView: View { Rectangle() .fill(Color.white.opacity(0.2)) .frame(maxHeight: height) - .offset(x: current * oneUnitWidth) + .offset(x: (dragging ? projectedValue : current) * oneUnitWidth) .zIndex(1) Rectangle() .fill(Color.white.opacity(0.6)) .frame(maxHeight: height) - .frame(width: current * oneUnitWidth) + .frame(width: (dragging ? projectedValue : current) * oneUnitWidth) .zIndex(1) segmentsLayers @@ -156,23 +156,6 @@ struct TimelineView: View { chaptersLayers .zIndex(3) } - - Rectangle() - .contentShape(Rectangle()) - .foregroundColor(Color.clear) - .overlay( - ZStack { - Circle() - .fill(dragging ? .white : .gray) - .frame(width: playerControlsLayout.thumbSize) - - Circle() - .fill(dragging ? .gray : .white) - .frame(width: playerControlsLayout.thumbSize * 0.95) - } - ) - .offset(x: thumbOffset) - .frame(width: thumbAreaWidth, height: thumbAreaWidth) } .opacity(player.liveStreamInAVPlayer ? 0 : 1) .overlay(GeometryReader { proxy in