mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Ctrl+A will now resize un-docked video player to display video in 1:1
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@462 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
cc5796fead
commit
29a5306035
@ -43,6 +43,9 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
set { _videoPlayer = value; }
|
||||
}
|
||||
|
||||
public int VideoWidth { get; set; }
|
||||
public int VideoHeight { get; set; }
|
||||
|
||||
private bool _isMuted;
|
||||
private double? _muteOldVolume;
|
||||
private readonly System.ComponentModel.ComponentResourceManager _resources;
|
||||
|
2
src/Forms/Main.Designer.cs
generated
2
src/Forms/Main.Designer.cs
generated
@ -2819,7 +2819,7 @@
|
||||
this.showOnlyWaveformToolStripMenuItem,
|
||||
this.showOnlySpectrogramToolStripMenuItem});
|
||||
this.contextMenuStripWaveForm.Name = "contextMenuStripWaveForm";
|
||||
this.contextMenuStripWaveForm.Size = new System.Drawing.Size(253, 236);
|
||||
this.contextMenuStripWaveForm.Size = new System.Drawing.Size(253, 214);
|
||||
this.contextMenuStripWaveForm.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripWaveForm_Opening);
|
||||
//
|
||||
// addParagraphHereToolStripMenuItem
|
||||
|
@ -684,7 +684,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAfABBgHwAQYBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAfgBBgH4AQYBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using Nikse.SubtitleEdit.Logic;
|
||||
using Nikse.SubtitleEdit.Controls;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
@ -57,11 +58,19 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.A)
|
||||
{
|
||||
//TODO: Resize to video size...
|
||||
if (_videoPlayerContainer.VideoWidth > 0 && _videoPlayerContainer.VideoHeight > 0)
|
||||
{
|
||||
int wDiff = _videoPlayerContainer.VideoWidth - _videoPlayerContainer.PanelPlayer.Width;
|
||||
int hDiff = _videoPlayerContainer.VideoHeight - _videoPlayerContainer.PanelPlayer.Height;
|
||||
Width += wDiff;
|
||||
Height += hDiff;
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
}
|
||||
else if (_redockKeys == e.KeyData)
|
||||
{
|
||||
_mainForm.redockVideoControlsToolStripMenuItem_Click(null, null);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1189,6 +1189,8 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
videoPlayerContainer.ShowStopButton = Configuration.Settings.General.VideoPlayerShowStopButton;
|
||||
videoPlayerContainer.Volume = Configuration.Settings.General.VideoPlayerDefaultVolume;
|
||||
videoPlayerContainer.EnableMouseWheelStep();
|
||||
videoPlayerContainer.VideoWidth = videoInfo.Width;
|
||||
videoPlayerContainer.VideoHeight = videoInfo.Height;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user