From 00767f4bf3c568f06735756939f78eb669ab8df5 Mon Sep 17 00:00:00 2001 From: Stypox Date: Fri, 18 Feb 2022 13:48:59 +0100 Subject: [PATCH] Fix fast seek overlay arc not correctly centered This happened in fullscreen player: while play-pause, brightness, volume, ... buttons were correctly centered in the app UI, the fast seek overlay was centered in the system UI, causing a mismatch between the two that looked ugly --- .../org/schabi/newpipe/player/Player.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index 516eafcd9..e0debc4e7 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -572,14 +572,20 @@ public final class Player implements }); // PlaybackControlRoot already consumed window insets but we should pass them to - // player_overlays too. Without it they will be off-centered + // player_overlays and fast_seek_overlay too. Without it they will be off-centered. binding.playbackControlRoot.addOnLayoutChangeListener( - (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> - binding.playerOverlays.setPadding( - v.getPaddingLeft(), - v.getPaddingTop(), - v.getPaddingRight(), - v.getPaddingBottom())); + (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> { + binding.playerOverlays.setPadding( + v.getPaddingLeft(), + v.getPaddingTop(), + v.getPaddingRight(), + v.getPaddingBottom()); + binding.fastSeekOverlay.setPadding( + v.getPaddingLeft(), + v.getPaddingTop(), + v.getPaddingRight(), + v.getPaddingBottom()); + }); } /**