Skip to content

Commit 00767f4

Browse files
StypoxTobiGr
authored andcommitted
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
1 parent 54f0b3d commit 00767f4

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/Player.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -572,14 +572,20 @@ public void onChange(final boolean selfChange) {
572572
});
573573

574574
// PlaybackControlRoot already consumed window insets but we should pass them to
575-
// player_overlays too. Without it they will be off-centered
575+
// player_overlays and fast_seek_overlay too. Without it they will be off-centered.
576576
binding.playbackControlRoot.addOnLayoutChangeListener(
577-
(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) ->
578-
binding.playerOverlays.setPadding(
579-
v.getPaddingLeft(),
580-
v.getPaddingTop(),
581-
v.getPaddingRight(),
582-
v.getPaddingBottom()));
577+
(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
578+
binding.playerOverlays.setPadding(
579+
v.getPaddingLeft(),
580+
v.getPaddingTop(),
581+
v.getPaddingRight(),
582+
v.getPaddingBottom());
583+
binding.fastSeekOverlay.setPadding(
584+
v.getPaddingLeft(),
585+
v.getPaddingTop(),
586+
v.getPaddingRight(),
587+
v.getPaddingBottom());
588+
});
583589
}
584590

585591
/**

0 commit comments

Comments
 (0)