player: upd fit video into dialog

This commit is contained in:
Yuriy Liskov
2025-07-13 19:47:29 +03:00
parent 487d03e2ec
commit 71a950a489

View File

@@ -52,8 +52,9 @@ public abstract class BasePlayerController implements PlayerEventListener {
}
getPlayer().showControls(false);
// Dialog takes up 40% of the screen space
float dialogWidth = TrackSelectorUtil.is4to3Screen(format) ? 1 : 40 * getMainUIData().getUIScale();
getPlayer().setZoomPercents((int)(100 - dialogWidth));
float dialogWidth = 40 * getMainUIData().getUIScale();
int initialZoom = TrackSelectorUtil.is4to3Screen(format) ? 120 : 100;
getPlayer().setZoomPercents((int)(initialZoom - dialogWidth));
getPlayer().setVideoGravity(settingsPresenter.isComments() && getPlayerTweaksData().isCommentsPlacedLeft() ?
Gravity.END | Gravity.CENTER_VERTICAL : Gravity.START | Gravity.CENTER_VERTICAL);
};