mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 15:02:35 +01:00
Fix a few minor UI issues - thx Jamakmake :)
This commit is contained in:
parent
5348f78fb6
commit
f8dbc15895
@ -2172,8 +2172,10 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
var bluePercent = color.B * 100 / total;
|
||||
|
||||
var idx = subtitleListView1.SelectedItems[0].Index;
|
||||
SetupProgressBar(GetIndices(true));
|
||||
for (int i = 0; i < subtitleListView1.SelectedIndices.Count; i++)
|
||||
{
|
||||
progressBar1.Value++;
|
||||
var index = subtitleListView1.SelectedIndices[i];
|
||||
var extra = _extra[index];
|
||||
var bmp = extra.Bitmap != null ? (Bitmap)extra.Bitmap.Clone() : GetBitmap(_binSubtitles[index]);
|
||||
@ -2192,6 +2194,7 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
|
||||
bmp.Dispose();
|
||||
}
|
||||
progressBar1.Hide();
|
||||
}
|
||||
|
||||
private Bitmap ColorBitmap(Bitmap bitmap, int redPercent, int greenPercent, int bluePercent)
|
||||
@ -2407,8 +2410,10 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
|
||||
var idx = subtitleListView1.SelectedItems[0].Index;
|
||||
var selectedIndices = GetIndices(onlySelectedLines);
|
||||
SetupProgressBar(selectedIndices);
|
||||
foreach (var index in selectedIndices)
|
||||
{
|
||||
progressBar1.Value++;
|
||||
var extra = _extra[index];
|
||||
var bmp = extra.Bitmap != null ? (Bitmap)extra.Bitmap.Clone() : GetBitmap(_binSubtitles[index]);
|
||||
FixAlignment(f.Alignment, extra, bmp);
|
||||
@ -2422,6 +2427,7 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
|
||||
bmp.Dispose();
|
||||
}
|
||||
progressBar1.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2660,8 +2666,10 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
}
|
||||
|
||||
var selectedIndices = GetIndices(onlySelectedLines);
|
||||
SetupProgressBar(selectedIndices);
|
||||
foreach (var i in selectedIndices)
|
||||
{
|
||||
progressBar1.Value++;
|
||||
var sub = _binSubtitles[i];
|
||||
extra = _extra[i];
|
||||
bmp = extra.Bitmap != null ? (Bitmap)extra.Bitmap.Clone() : GetBitmap(sub);
|
||||
@ -2680,6 +2688,7 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
|
||||
bmp.Dispose();
|
||||
}
|
||||
progressBar1.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2733,8 +2742,10 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
}
|
||||
|
||||
var selectedIndices = GetIndices(onlySelectedLines);
|
||||
SetupProgressBar(selectedIndices);
|
||||
foreach (var i in selectedIndices)
|
||||
{
|
||||
progressBar1.Value++;
|
||||
var sub = _binSubtitles[i];
|
||||
extra = _extra[i];
|
||||
bmp = extra.Bitmap != null ? (Bitmap)extra.Bitmap.Clone() : GetBitmap(sub);
|
||||
@ -2751,6 +2762,7 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
|
||||
bmp.Dispose();
|
||||
}
|
||||
progressBar1.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2788,8 +2800,10 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
}
|
||||
|
||||
var selectedIndices = GetIndices(onlySelectedLines);
|
||||
SetupProgressBar(selectedIndices);
|
||||
foreach (var i in selectedIndices)
|
||||
{
|
||||
progressBar1.Value++;
|
||||
var sub = _binSubtitles[i];
|
||||
extra = _extra[i];
|
||||
bmp = extra.Bitmap != null ? (Bitmap)extra.Bitmap.Clone() : GetBitmap(sub);
|
||||
@ -2806,6 +2820,17 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
|
||||
bmp.Dispose();
|
||||
}
|
||||
progressBar1.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupProgressBar(List<int> selectedIndices)
|
||||
{
|
||||
if (selectedIndices.Count > 10)
|
||||
{
|
||||
progressBar1.Maximum = selectedIndices.Count;
|
||||
progressBar1.Value = 0;
|
||||
progressBar1.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Text = LanguageSettings.Current.CompareSubtitles.Title;
|
||||
buttonReloadSubtitle1.Text = LanguageSettings.Current.CompareSubtitles.Reload;
|
||||
buttonReloadSubtitle2.Text = LanguageSettings.Current.CompareSubtitles.Reload;
|
||||
using (var graphics = CreateGraphics())
|
||||
{
|
||||
var w = (int)graphics.MeasureString(buttonReloadSubtitle1.Text, Font).Width;
|
||||
buttonReloadSubtitle1.Width = w + 17;
|
||||
buttonReloadSubtitle2.Width = w + 17;
|
||||
}
|
||||
|
||||
buttonPreviousDifference.Text = LanguageSettings.Current.CompareSubtitles.PreviousDifference;
|
||||
buttonNextDifference.Text = LanguageSettings.Current.CompareSubtitles.NextDifference;
|
||||
checkBoxShowOnlyDifferences.Text = LanguageSettings.Current.CompareSubtitles.ShowOnlyDifferences;
|
||||
|
@ -510,9 +510,9 @@
|
||||
this.groupBoxBorder.Controls.Add(this.numericUpDownShadowWidth);
|
||||
this.groupBoxBorder.Controls.Add(this.numericUpDownOutline);
|
||||
this.groupBoxBorder.Controls.Add(this.labelShadow);
|
||||
this.groupBoxBorder.Location = new System.Drawing.Point(230, 143);
|
||||
this.groupBoxBorder.Location = new System.Drawing.Point(244, 143);
|
||||
this.groupBoxBorder.Name = "groupBoxBorder";
|
||||
this.groupBoxBorder.Size = new System.Drawing.Size(242, 93);
|
||||
this.groupBoxBorder.Size = new System.Drawing.Size(228, 93);
|
||||
this.groupBoxBorder.TabIndex = 3;
|
||||
this.groupBoxBorder.TabStop = false;
|
||||
this.groupBoxBorder.Text = "Border";
|
||||
@ -547,7 +547,7 @@
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.numericUpDownShadowWidth.Location = new System.Drawing.Point(150, 32);
|
||||
this.numericUpDownShadowWidth.Location = new System.Drawing.Point(145, 32);
|
||||
this.numericUpDownShadowWidth.Name = "numericUpDownShadowWidth";
|
||||
this.numericUpDownShadowWidth.Size = new System.Drawing.Size(52, 20);
|
||||
this.numericUpDownShadowWidth.TabIndex = 3;
|
||||
@ -570,7 +570,7 @@
|
||||
// labelShadow
|
||||
//
|
||||
this.labelShadow.AutoSize = true;
|
||||
this.labelShadow.Location = new System.Drawing.Point(147, 16);
|
||||
this.labelShadow.Location = new System.Drawing.Point(142, 16);
|
||||
this.labelShadow.Name = "labelShadow";
|
||||
this.labelShadow.Size = new System.Drawing.Size(46, 13);
|
||||
this.labelShadow.TabIndex = 2;
|
||||
@ -601,9 +601,9 @@
|
||||
this.groupBoxMargins.Controls.Add(this.labelMarginVertical);
|
||||
this.groupBoxMargins.Controls.Add(this.labelMarginRight);
|
||||
this.groupBoxMargins.Controls.Add(this.labelMarginLeft);
|
||||
this.groupBoxMargins.Location = new System.Drawing.Point(105, 143);
|
||||
this.groupBoxMargins.Location = new System.Drawing.Point(115, 143);
|
||||
this.groupBoxMargins.Name = "groupBoxMargins";
|
||||
this.groupBoxMargins.Size = new System.Drawing.Size(119, 93);
|
||||
this.groupBoxMargins.Size = new System.Drawing.Size(123, 93);
|
||||
this.groupBoxMargins.TabIndex = 2;
|
||||
this.groupBoxMargins.TabStop = false;
|
||||
this.groupBoxMargins.Text = "Margins";
|
||||
@ -782,7 +782,7 @@
|
||||
this.groupBoxAlignment.Controls.Add(this.radioButtonTopLeft);
|
||||
this.groupBoxAlignment.Location = new System.Drawing.Point(7, 143);
|
||||
this.groupBoxAlignment.Name = "groupBoxAlignment";
|
||||
this.groupBoxAlignment.Size = new System.Drawing.Size(92, 93);
|
||||
this.groupBoxAlignment.Size = new System.Drawing.Size(102, 93);
|
||||
this.groupBoxAlignment.TabIndex = 0;
|
||||
this.groupBoxAlignment.TabStop = false;
|
||||
this.groupBoxAlignment.Text = "Alignment";
|
||||
@ -1355,11 +1355,11 @@
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Advanced SubStation Alpha styles";
|
||||
this.Shown += new System.EventHandler(this.SubStationAlphaStyles_Shown);
|
||||
this.ResizeEnd += new System.EventHandler(this.SubStationAlphaStyles_ResizeEnd);
|
||||
this.SizeChanged += new System.EventHandler(this.SubStationAlphaStyles_SizeChanged);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubStationAlphaStyles_KeyDown);
|
||||
this.Resize += new System.EventHandler(this.SubStationAlphaStyles_Resize);
|
||||
this.ResizeEnd += new System.EventHandler(this.SubStationAlphaStyles_ResizeEnd);
|
||||
this.Shown += new System.EventHandler(this.SubStationAlphaStyles_Shown);
|
||||
this.SizeChanged += new System.EventHandler(this.SubStationAlphaStyles_SizeChanged);
|
||||
this.contextMenuStripFile.ResumeLayout(false);
|
||||
this.groupBoxStyles.ResumeLayout(false);
|
||||
this.groupBoxProperties.ResumeLayout(false);
|
||||
|
Loading…
Reference in New Issue
Block a user