mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
[Beamer] - Add 'Right' aligment.
This commit is contained in:
parent
ab381d4fe2
commit
0ef735e290
3
src/Forms/Beamer.Designer.cs
generated
3
src/Forms/Beamer.Designer.cs
generated
@ -79,7 +79,8 @@
|
||||
this.comboBoxHAlign.FormattingEnabled = true;
|
||||
this.comboBoxHAlign.Items.AddRange(new object[] {
|
||||
"Left",
|
||||
"Center"});
|
||||
"Center",
|
||||
"Right"});
|
||||
this.comboBoxHAlign.Location = new System.Drawing.Point(100, 78);
|
||||
this.comboBoxHAlign.Name = "comboBoxHAlign";
|
||||
this.comboBoxHAlign.Size = new System.Drawing.Size(121, 21);
|
||||
|
@ -145,10 +145,18 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
var bmp = GenerateImageFromTextWithStyle(text);
|
||||
pictureBox1.Top = groupBoxImageSettings.Top + groupBoxImageSettings.Height + 5;
|
||||
pictureBox1.Left = 5;
|
||||
if (comboBoxHAlign.SelectedIndex == 1) // center
|
||||
// Aligment direction.
|
||||
switch (comboBoxHAlign.SelectedIndex)
|
||||
{
|
||||
case 0: // Left.
|
||||
pictureBox1.Left = 5;
|
||||
break;
|
||||
case 1: // Center.
|
||||
pictureBox1.Left = ((groupBoxImageSettings.Width - bmp.Width) / 2);
|
||||
break;
|
||||
case 2: // Right.
|
||||
pictureBox1.Left = groupBoxImageSettings.Width - bmp.Width;
|
||||
break;
|
||||
}
|
||||
pictureBox1.Image = bmp;
|
||||
pictureBox1.Height = bmp.Height;
|
||||
|
Loading…
Reference in New Issue
Block a user