Minor fixes for translation space/width - thx Andrebavila :)

Related to comment https://github.com/SubtitleEdit/subtitleedit/issues/4131#issuecomment-620068311  in #4131
This commit is contained in:
Nikolaj Olsson 2020-04-27 19:40:06 +02:00
parent ccc961bda1
commit a578d923a6
2 changed files with 17 additions and 0 deletions

View File

@ -617,6 +617,7 @@
// comboBoxResolution
//
this.comboBoxResolution.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxResolution.DropDownWidth = 160;
this.comboBoxResolution.FormattingEnabled = true;
this.comboBoxResolution.Items.AddRange(new object[] {
"4K (4096x2160)",

View File

@ -472,6 +472,22 @@ namespace Nikse.SubtitleEdit.Forms
comboBoxSplitBehavior.SelectedIndex = gs.SplitBehavior;
labelSplitBehavior.Text = language.SplitBehavior;
comboBoxSplitBehavior.Left = labelTimeCodeMode.Left + labelTimeCodeMode.Width + 4;
if (labelSplitBehavior.Width > labelTimeCodeMode.Width)
{
comboBoxSplitBehavior.Left = labelSplitBehavior.Left + labelSplitBehavior.Width + 4;
}
var dropDownSplitBehaviorWidth = comboBoxSplitBehavior.Width;
using (var g = Graphics.FromHwnd(IntPtr.Zero))
{
foreach (var item in comboBoxSplitBehavior.Items)
{
var itemWidth = (int)g.MeasureString((string)item, Font).Width + 5;
dropDownSplitBehaviorWidth = Math.Max(itemWidth, dropDownSplitBehaviorWidth);
}
}
comboBoxSplitBehavior.DropDownWidth = dropDownSplitBehaviorWidth;
comboBoxAutoBackup.Items[0] = Configuration.Settings.Language.General.None;
comboBoxAutoBackup.Items[1] = language.AutoBackupEveryMinute;