Don't resize video in fullscreen (only mpv) - thx Alex :)

This commit is contained in:
niksedk 2023-06-04 15:21:05 +02:00
parent 4cda9dcba7
commit 92b04ff61f
2 changed files with 24 additions and 4 deletions

View File

@ -647,11 +647,20 @@ namespace Nikse.SubtitleEdit.Controls
{
_panelControls.Visible = true;
_panelControls.BringToFront();
_panelSubtitle.Height -= ControlsHeight;
if (PanelPlayer.Dock == DockStyle.Fill)
var useCompleteFullscreen = VideoPlayer is LibMpvDynamic && Configuration.Settings.General.MpvHandlesPreviewText;
if (useCompleteFullscreen && PanelPlayer.Dock == DockStyle.Fill)
{
PanelPlayer.Dock = DockStyle.None;
// keep fullscreen
}
else
{
_panelSubtitle.Height -= ControlsHeight;
if (PanelPlayer.Dock == DockStyle.Fill)
{
PanelPlayer.Dock = DockStyle.None;
}
}
}
@ -1272,6 +1281,16 @@ namespace Nikse.SubtitleEdit.Controls
_pictureBoxFullscreen.Visible = false;
}
public void SetFullFixed()
{
var useCompleteFullscreen = VideoPlayer is LibMpvDynamic && Configuration.Settings.General.MpvHandlesPreviewText;
if (useCompleteFullscreen)
{
PanelPlayer.Dock = DockStyle.Fill;
_panelControls.BringToFront();
}
}
public void ShowFullScreenControls()
{
_pictureBoxFullscreen.Image = (Image)_resources.GetObject("pictureBoxNoFS.Image");

View File

@ -19,7 +19,7 @@ namespace Nikse.SubtitleEdit.Forms
private readonly Keys _mainGeneralGoToPrevSubtitlePlayTranslate = UiUtil.GetKeys(Configuration.Settings.Shortcuts.GeneralGoToPrevSubtitlePlayTranslate);
private bool _autoSized;
private Dictionary<DateTime, int> _mouseMoveDiff;
private readonly Dictionary<DateTime, int> _mouseMoveDiff;
private int _mouseLastX = -1;
private int _mouseLastY = -1;
@ -240,6 +240,7 @@ namespace Nikse.SubtitleEdit.Forms
_videoPlayerContainer.SetSubtitleFont();
_videoPlayerContainer.SubtitleText = string.Empty;
_videoPlayerContainer.ShowFullScreenControls();
_videoPlayerContainer.SetFullFixed();
timer1.Start();
}