From 93f3a29581ff22aece08bc1f6de3e0bf6b230c00 Mon Sep 17 00:00:00 2001 From: niksedk Date: Sat, 5 Aug 2023 08:29:26 +0200 Subject: [PATCH] Minor UI stuff - thx Leon :) Related to #7205 --- src/ui/Controls/NikseLabel.cs | 41 +++++++++++++++- src/ui/Forms/Assa/AssaStyles.Designer.cs | 60 ++++++++++++------------ src/ui/Forms/ImportText.Designer.cs | 24 +++++----- src/ui/Forms/JoinSubtitles.Designer.cs | 8 ++-- src/ui/Forms/Main.Designer.cs | 18 +++---- src/ui/Forms/Main.cs | 16 ------- 6 files changed, 95 insertions(+), 72 deletions(-) diff --git a/src/ui/Controls/NikseLabel.cs b/src/ui/Controls/NikseLabel.cs index 7fa859f97..289dca868 100644 --- a/src/ui/Controls/NikseLabel.cs +++ b/src/ui/Controls/NikseLabel.cs @@ -15,7 +15,25 @@ namespace Nikse.SubtitleEdit.Controls internal static StringFormat CreateStringFormat(Control control, ContentAlignment contentAlignment, bool showEllipsis) { - var stringFormat = new StringFormat(); //TODO: { Alignment = textAlign}; + var stringFormat = new StringFormat(); + + if (contentAlignment == ContentAlignment.TopRight || + contentAlignment == ContentAlignment.MiddleRight || + contentAlignment == ContentAlignment.BottomRight) + { + stringFormat.Alignment = StringAlignment.Far; + } + else if (contentAlignment == ContentAlignment.TopCenter || + contentAlignment == ContentAlignment.MiddleCenter || + contentAlignment == ContentAlignment.BottomCenter) + { + stringFormat.Alignment = StringAlignment.Center; + } + else + { + stringFormat.Alignment = StringAlignment.Near; + } + if (control.RightToLeft == RightToLeft.Yes) { stringFormat.FormatFlags |= StringFormatFlags.DirectionRightToLeft; @@ -44,6 +62,27 @@ namespace Nikse.SubtitleEdit.Controls textFormatFlags |= TextFormatFlags.EndEllipsis; } + if (contentAlignment == ContentAlignment.TopCenter || + contentAlignment == ContentAlignment.MiddleCenter || + contentAlignment == ContentAlignment.BottomCenter) + { + textFormatFlags |= (textFormatFlags & TextFormatFlags.VerticalCenter); + } + + if (contentAlignment == ContentAlignment.TopLeft || + contentAlignment == ContentAlignment.MiddleLeft || + contentAlignment == ContentAlignment.BottomLeft) + { + textFormatFlags |= (textFormatFlags & TextFormatFlags.Left); + } + + if (contentAlignment == ContentAlignment.TopRight || + contentAlignment == ContentAlignment.MiddleRight || + contentAlignment == ContentAlignment.BottomRight) + { + textFormatFlags |= (textFormatFlags & TextFormatFlags.Right); + } + if (control.RightToLeft == RightToLeft.Yes) { textFormatFlags |= TextFormatFlags.RightToLeft; diff --git a/src/ui/Forms/Assa/AssaStyles.Designer.cs b/src/ui/Forms/Assa/AssaStyles.Designer.cs index 3d6504ed5..d475b3ce7 100644 --- a/src/ui/Forms/Assa/AssaStyles.Designer.cs +++ b/src/ui/Forms/Assa/AssaStyles.Designer.cs @@ -70,16 +70,16 @@ this.radioButtonOutline = new System.Windows.Forms.RadioButton(); this.numericUpDownShadowWidth = new Nikse.SubtitleEdit.Controls.NikseUpDown(); this.numericUpDownOutline = new Nikse.SubtitleEdit.Controls.NikseUpDown(); - this.labelShadow = new System.Windows.Forms.Label(); + this.labelShadow = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.textBoxStyleName = new System.Windows.Forms.TextBox(); - this.labelStyleName = new System.Windows.Forms.Label(); + this.labelStyleName = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.groupBoxMargins = new System.Windows.Forms.GroupBox(); this.numericUpDownMarginVertical = new Nikse.SubtitleEdit.Controls.NikseUpDown(); this.numericUpDownMarginRight = new Nikse.SubtitleEdit.Controls.NikseUpDown(); this.numericUpDownMarginLeft = new Nikse.SubtitleEdit.Controls.NikseUpDown(); - this.labelMarginVertical = new System.Windows.Forms.Label(); - this.labelMarginRight = new System.Windows.Forms.Label(); - this.labelMarginLeft = new System.Windows.Forms.Label(); + this.labelMarginVertical = new Nikse.SubtitleEdit.Controls.NikseLabel(); + this.labelMarginRight = new Nikse.SubtitleEdit.Controls.NikseLabel(); + this.labelMarginLeft = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.groupBoxColors = new System.Windows.Forms.GroupBox(); this.panelBackColor = new System.Windows.Forms.Panel(); this.buttonBackColor = new System.Windows.Forms.Button(); @@ -105,13 +105,13 @@ this.setPreviewTextToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.groupBoxFont = new System.Windows.Forms.GroupBox(); this.numericUpDownAngle = new Nikse.SubtitleEdit.Controls.NikseUpDown(); - this.labelAngle = new System.Windows.Forms.Label(); + this.labelAngle = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.numericUpDownSpacing = new Nikse.SubtitleEdit.Controls.NikseUpDown(); - this.labelSpacing = new System.Windows.Forms.Label(); + this.labelSpacing = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.numericUpDownScaleY = new Nikse.SubtitleEdit.Controls.NikseUpDown(); - this.labelScaleY = new System.Windows.Forms.Label(); + this.labelScaleY = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.numericUpDownScaleX = new Nikse.SubtitleEdit.Controls.NikseUpDown(); - this.labelScaleX = new System.Windows.Forms.Label(); + this.labelScaleX = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.checkBoxStrikeout = new System.Windows.Forms.CheckBox(); this.buttonPickAttachmentFont = new System.Windows.Forms.Button(); this.checkBoxFontUnderline = new System.Windows.Forms.CheckBox(); @@ -119,18 +119,18 @@ this.checkBoxFontItalic = new System.Windows.Forms.CheckBox(); this.checkBoxFontBold = new System.Windows.Forms.CheckBox(); this.comboBoxFontName = new Nikse.SubtitleEdit.Controls.NikseComboBox(); - this.labelFontSize = new System.Windows.Forms.Label(); - this.labelFontName = new System.Windows.Forms.Label(); + this.labelFontSize = new Nikse.SubtitleEdit.Controls.NikseLabel(); + this.labelFontName = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.colorDialogSSAStyle = new System.Windows.Forms.ColorDialog(); this.openFileDialogImport = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialogStyle = new System.Windows.Forms.SaveFileDialog(); - this.labelStatus = new System.Windows.Forms.Label(); + this.labelStatus = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.timerClearStatus = new System.Windows.Forms.Timer(this.components); this.groupBoxStorage = new System.Windows.Forms.GroupBox(); this.buttonAddToFile = new System.Windows.Forms.Button(); this.buttonStorageExport = new System.Windows.Forms.Button(); this.buttonStorageImport = new System.Windows.Forms.Button(); - this.labelDuplicateStyleNames = new System.Windows.Forms.Label(); + this.labelDuplicateStyleNames = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.buttonStorageCopy = new System.Windows.Forms.Button(); this.buttonStorageRemoveAll = new System.Windows.Forms.Button(); this.buttonStorageAdd = new System.Windows.Forms.Button(); @@ -160,12 +160,12 @@ this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItemStorageImport = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItemStorageExport = new System.Windows.Forms.ToolStripMenuItem(); - this.labelCategoryDefaultNote = new System.Windows.Forms.Label(); + this.labelCategoryDefaultNote = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.buttonStorageManageCategories = new System.Windows.Forms.Button(); this.buttonStorageCategoryDelete = new System.Windows.Forms.Button(); this.buttonStorageCategoryNew = new System.Windows.Forms.Button(); this.comboboxStorageCategories = new Nikse.SubtitleEdit.Controls.NikseComboBox(); - this.labelStorageCategory = new System.Windows.Forms.Label(); + this.labelStorageCategory = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.buttonApply = new System.Windows.Forms.Button(); this.contextMenuStripFile.SuspendLayout(); @@ -1685,8 +1685,8 @@ private System.Windows.Forms.GroupBox groupBoxAlignment; private System.Windows.Forms.GroupBox groupBoxFont; private Nikse.SubtitleEdit.Controls.NikseComboBox comboBoxFontName; - private System.Windows.Forms.Label labelFontSize; - private System.Windows.Forms.Label labelFontName; + private Nikse.SubtitleEdit.Controls.NikseLabel labelFontSize; + private Nikse.SubtitleEdit.Controls.NikseLabel labelFontName; private System.Windows.Forms.GroupBox groupBoxPreview; private System.Windows.Forms.RadioButton radioButtonBottomRight; private System.Windows.Forms.RadioButton radioButtonBottomCenter; @@ -1701,9 +1701,9 @@ private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownMarginVertical; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownMarginRight; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownMarginLeft; - private System.Windows.Forms.Label labelMarginVertical; - private System.Windows.Forms.Label labelMarginRight; - private System.Windows.Forms.Label labelMarginLeft; + private Nikse.SubtitleEdit.Controls.NikseLabel labelMarginVertical; + private Nikse.SubtitleEdit.Controls.NikseLabel labelMarginRight; + private Nikse.SubtitleEdit.Controls.NikseLabel labelMarginLeft; private System.Windows.Forms.Panel panelBackColor; private System.Windows.Forms.Button buttonBackColor; private System.Windows.Forms.Panel panelOutlineColor; @@ -1716,7 +1716,7 @@ private System.Windows.Forms.CheckBox checkBoxFontItalic; private System.Windows.Forms.CheckBox checkBoxFontBold; private System.Windows.Forms.TextBox textBoxStyleName; - private System.Windows.Forms.Label labelStyleName; + private Nikse.SubtitleEdit.Controls.NikseLabel labelStyleName; private System.Windows.Forms.PictureBox pictureBoxPreview; private System.Windows.Forms.Button buttonRemoveAll; private System.Windows.Forms.CheckBox checkBoxFontUnderline; @@ -1726,7 +1726,7 @@ private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownOutline; private System.Windows.Forms.GroupBox groupBoxBorder; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownShadowWidth; - private System.Windows.Forms.Label labelShadow; + private Nikse.SubtitleEdit.Controls.NikseLabel labelShadow; private System.Windows.Forms.RadioButton radioButtonOpaqueBox; private System.Windows.Forms.RadioButton radioButtonOutline; private System.Windows.Forms.Button buttonImport; @@ -1734,15 +1734,15 @@ private System.Windows.Forms.ColumnHeader columnHeaderUseCount; private System.Windows.Forms.Button buttonExport; private System.Windows.Forms.SaveFileDialog saveFileDialogStyle; - private System.Windows.Forms.Label labelStatus; + private Nikse.SubtitleEdit.Controls.NikseLabel labelStatus; private System.Windows.Forms.Timer timerClearStatus; private System.Windows.Forms.GroupBox groupBoxStorage; - private System.Windows.Forms.Label labelStorageCategory; + private Nikse.SubtitleEdit.Controls.NikseLabel labelStorageCategory; private Nikse.SubtitleEdit.Controls.NikseComboBox comboboxStorageCategories; private System.Windows.Forms.Button buttonStorageCategoryNew; private System.Windows.Forms.Button buttonStorageCategoryDelete; private System.Windows.Forms.Button buttonStorageManageCategories; - private System.Windows.Forms.Label labelCategoryDefaultNote; + private Nikse.SubtitleEdit.Controls.NikseLabel labelCategoryDefaultNote; private System.Windows.Forms.ListView listViewStorage; private System.Windows.Forms.ColumnHeader columnHeader1; private System.Windows.Forms.ColumnHeader columnHeader2; @@ -1799,15 +1799,15 @@ private System.Windows.Forms.Button buttonPickAttachmentFont; private System.Windows.Forms.CheckBox checkBoxStrikeout; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownAngle; - private System.Windows.Forms.Label labelAngle; + private Nikse.SubtitleEdit.Controls.NikseLabel labelAngle; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownSpacing; - private System.Windows.Forms.Label labelSpacing; + private Nikse.SubtitleEdit.Controls.NikseLabel labelSpacing; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownScaleY; - private System.Windows.Forms.Label labelScaleY; + private Nikse.SubtitleEdit.Controls.NikseLabel labelScaleY; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownScaleX; - private System.Windows.Forms.Label labelScaleX; + private Nikse.SubtitleEdit.Controls.NikseLabel labelScaleX; private Nikse.SubtitleEdit.Controls.NikseComboBox comboBoxOpaqueBoxStyle; - private System.Windows.Forms.Label labelDuplicateStyleNames; + private Nikse.SubtitleEdit.Controls.NikseLabel labelDuplicateStyleNames; private System.Windows.Forms.ToolStripMenuItem removeAndReplaceWithToolStripMenuItem; } } \ No newline at end of file diff --git a/src/ui/Forms/ImportText.Designer.cs b/src/ui/Forms/ImportText.Designer.cs index 535398eb0..fc8478bee 100644 --- a/src/ui/Forms/ImportText.Designer.cs +++ b/src/ui/Forms/ImportText.Designer.cs @@ -42,17 +42,17 @@ this.checkBoxTakeTimeFromFileNames = new System.Windows.Forms.CheckBox(); this.groupBoxAutoSplitSettings = new System.Windows.Forms.GroupBox(); this.checkBoxAutoSplitAtEnd = new System.Windows.Forms.CheckBox(); - this.labelSubMaxLen = new System.Windows.Forms.Label(); + this.labelSubMaxLen = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.numericUpDownSubtitleLineMaximumLength = new Nikse.SubtitleEdit.Controls.NikseUpDown(); this.textBoxAsEnd = new System.Windows.Forms.TextBox(); this.checkBoxAutoSplitRemoveLinesNoLetters = new System.Windows.Forms.CheckBox(); this.checkBoxAutoSplitAtBlankLines = new System.Windows.Forms.CheckBox(); this.numericUpDownAutoSplitMaxLines = new Nikse.SubtitleEdit.Controls.NikseUpDown(); - this.labelAutoSplitNumberOfLines = new System.Windows.Forms.Label(); + this.labelAutoSplitNumberOfLines = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.checkBoxAutoBreak = new System.Windows.Forms.CheckBox(); this.checkBoxGenerateTimeCodes = new System.Windows.Forms.CheckBox(); this.groupBoxTimeCodes = new System.Windows.Forms.GroupBox(); - this.labelGapBetweenSubtitles = new System.Windows.Forms.Label(); + this.labelGapBetweenSubtitles = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.numericUpDownGapBetweenLines = new Nikse.SubtitleEdit.Controls.NikseUpDown(); this.groupBoxDuration = new System.Windows.Forms.GroupBox(); this.numericUpDownDurationFixed = new Nikse.SubtitleEdit.Controls.NikseUpDown(); @@ -63,7 +63,7 @@ this.groupBoxSplitting = new System.Windows.Forms.GroupBox(); this.comboBoxLineMode = new Nikse.SubtitleEdit.Controls.NikseComboBox(); this.comboBoxLineBreak = new Nikse.SubtitleEdit.Controls.NikseComboBox(); - this.labelLineBreak = new System.Windows.Forms.Label(); + this.labelLineBreak = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.radioButtonSplitAtBlankLines = new System.Windows.Forms.RadioButton(); this.radioButtonAutoSplit = new System.Windows.Forms.RadioButton(); this.radioButtonLineMode = new System.Windows.Forms.RadioButton(); @@ -76,9 +76,9 @@ this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.buttonCancel = new System.Windows.Forms.Button(); this.buttonOK = new System.Windows.Forms.Button(); - this.labelStatus = new System.Windows.Forms.Label(); + this.labelStatus = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.buttonBrowseEncoding = new System.Windows.Forms.Button(); - this.labelEncoding = new System.Windows.Forms.Label(); + this.labelEncoding = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.comboBoxEncoding = new Nikse.SubtitleEdit.Controls.NikseComboBox(); this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView(); this.groupBoxImportText.SuspendLayout(); @@ -801,7 +801,7 @@ private System.Windows.Forms.CheckBox checkBoxRemoveEmptyLines; private System.Windows.Forms.CheckBox checkBoxRemoveLinesWithoutLetters; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownGapBetweenLines; - private System.Windows.Forms.Label labelGapBetweenSubtitles; + private Nikse.SubtitleEdit.Controls.NikseLabel labelGapBetweenSubtitles; private System.Windows.Forms.Button buttonRefresh; private System.Windows.Forms.GroupBox groupBoxDuration; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownDurationFixed; @@ -811,7 +811,7 @@ private System.Windows.Forms.RadioButton radioButtonSplitAtBlankLines; private System.Windows.Forms.CheckBox checkBoxGenerateTimeCodes; private System.Windows.Forms.GroupBox groupBoxTimeCodes; - private System.Windows.Forms.Label labelLineBreak; + private Nikse.SubtitleEdit.Controls.NikseLabel labelLineBreak; private System.Windows.Forms.CheckBox checkBoxMultipleFiles; private System.Windows.Forms.ListView listViewInputFiles; private System.Windows.Forms.ColumnHeader columnHeaderFName; @@ -827,16 +827,16 @@ private System.Windows.Forms.CheckBox checkBoxAutoSplitRemoveLinesNoLetters; private System.Windows.Forms.CheckBox checkBoxAutoSplitAtBlankLines; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownAutoSplitMaxLines; - private System.Windows.Forms.Label labelAutoSplitNumberOfLines; - private System.Windows.Forms.Label labelSubMaxLen; + private Nikse.SubtitleEdit.Controls.NikseLabel labelAutoSplitNumberOfLines; + private Nikse.SubtitleEdit.Controls.NikseLabel labelSubMaxLen; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownSubtitleLineMaximumLength; private System.Windows.Forms.CheckBox checkBoxAutoSplitAtEnd; private Nikse.SubtitleEdit.Controls.NikseComboBox comboBoxLineMode; private System.Windows.Forms.CheckBox checkBoxTakeTimeFromFileNames; - private System.Windows.Forms.Label labelStatus; + private Nikse.SubtitleEdit.Controls.NikseLabel labelStatus; private System.Windows.Forms.CheckBox checkBoxUseTimeCodeFromCurrentFile; private System.Windows.Forms.Button buttonBrowseEncoding; - private System.Windows.Forms.Label labelEncoding; + private Nikse.SubtitleEdit.Controls.NikseLabel labelEncoding; private Nikse.SubtitleEdit.Controls.NikseComboBox comboBoxEncoding; } } \ No newline at end of file diff --git a/src/ui/Forms/JoinSubtitles.Designer.cs b/src/ui/Forms/JoinSubtitles.Designer.cs index bd6f202b3..18000f32d 100644 --- a/src/ui/Forms/JoinSubtitles.Designer.cs +++ b/src/ui/Forms/JoinSubtitles.Designer.cs @@ -36,7 +36,7 @@ this.columnHeaderEndTime = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeaderFileName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.groupBoxPreview = new System.Windows.Forms.GroupBox(); - this.labelTotalLines = new System.Windows.Forms.Label(); + this.labelTotalLines = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.buttonClear = new System.Windows.Forms.Button(); this.buttonRemoveFile = new System.Windows.Forms.Button(); this.buttonAddFile = new System.Windows.Forms.Button(); @@ -44,7 +44,7 @@ this.radioButtonJoinPlain = new System.Windows.Forms.RadioButton(); this.numericUpDownAddMs = new Nikse.SubtitleEdit.Controls.NikseUpDown(); this.radioButtonJoinAddTime = new System.Windows.Forms.RadioButton(); - this.labelAddTime = new System.Windows.Forms.Label(); + this.labelAddTime = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.groupBoxPreview.SuspendLayout(); this.SuspendLayout(); // @@ -273,10 +273,10 @@ private System.Windows.Forms.Button buttonAddFile; private System.Windows.Forms.ColumnHeader columnHeaderEndTime; private System.Windows.Forms.OpenFileDialog openFileDialog1; - private System.Windows.Forms.Label labelTotalLines; + private Nikse.SubtitleEdit.Controls.NikseLabel labelTotalLines; private System.Windows.Forms.RadioButton radioButtonJoinPlain; private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownAddMs; private System.Windows.Forms.RadioButton radioButtonJoinAddTime; - private System.Windows.Forms.Label labelAddTime; + private Nikse.SubtitleEdit.Controls.NikseLabel labelAddTime; } } \ No newline at end of file diff --git a/src/ui/Forms/Main.Designer.cs b/src/ui/Forms/Main.Designer.cs index b5b175e77..6f29906ec 100644 --- a/src/ui/Forms/Main.Designer.cs +++ b/src/ui/Forms/Main.Designer.cs @@ -535,8 +535,8 @@ namespace Nikse.SubtitleEdit.Forms this.labelOriginalCharactersPerSecond = new System.Windows.Forms.Label(); this.labelTextOriginalLineTotal = new System.Windows.Forms.Label(); this.labelTextOriginalLineLengths = new System.Windows.Forms.Label(); - this.labelOriginalText = new System.Windows.Forms.Label(); - this.labelText = new System.Windows.Forms.Label(); + this.labelOriginalText = new Nikse.SubtitleEdit.Controls.NikseLabel(); + this.labelText = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.textBoxListViewTextOriginal = new Nikse.SubtitleEdit.Controls.SETextBox(); this.buttonAutoBreak = new System.Windows.Forms.Button(); this.labelTextLineLengths = new System.Windows.Forms.Label(); @@ -547,9 +547,9 @@ namespace Nikse.SubtitleEdit.Forms this.numericUpDownDuration = new Nikse.SubtitleEdit.Controls.NikseUpDown(); this.buttonPrevious = new System.Windows.Forms.Button(); this.buttonNext = new System.Windows.Forms.Button(); - this.labelStartTime = new System.Windows.Forms.Label(); - this.labelDuration = new System.Windows.Forms.Label(); - this.labelAutoDuration = new System.Windows.Forms.Label(); + this.labelStartTime = new Nikse.SubtitleEdit.Controls.NikseLabel(); + this.labelDuration = new Nikse.SubtitleEdit.Controls.NikseLabel(); + this.labelAutoDuration = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.pictureBoxRecord = new System.Windows.Forms.PictureBox(); this.textBoxSource = new System.Windows.Forms.TextBox(); this.contextMenuStripTextBoxSourceView = new System.Windows.Forms.ContextMenuStrip(this.components); @@ -5989,9 +5989,9 @@ namespace Nikse.SubtitleEdit.Forms private System.Windows.Forms.ToolStripMenuItem italicToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem underlineToolStripMenuItem; private System.Windows.Forms.GroupBox groupBoxEdit; - private System.Windows.Forms.Label labelText; - private System.Windows.Forms.Label labelDuration; - private System.Windows.Forms.Label labelStartTime; + private Nikse.SubtitleEdit.Controls.NikseLabel labelText; + private Nikse.SubtitleEdit.Controls.NikseLabel labelDuration; + private Nikse.SubtitleEdit.Controls.NikseLabel labelStartTime; Nikse.SubtitleEdit.Controls.SETextBox textBoxListViewText; private System.Windows.Forms.Button buttonPrevious; private System.Windows.Forms.Button buttonNext; @@ -6167,7 +6167,7 @@ namespace Nikse.SubtitleEdit.Forms private System.Windows.Forms.ToolStripMenuItem insertLineToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem closeVideoToolStripMenuItem; private System.Windows.Forms.Label labelSingleLine; - private System.Windows.Forms.Label labelOriginalText; + private Nikse.SubtitleEdit.Controls.NikseLabel labelOriginalText; private System.Windows.Forms.Label labelOriginalCharactersPerSecond; private System.Windows.Forms.Label labelTextOriginalLineTotal; private System.Windows.Forms.Label labelOriginalSingleLine; diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index 642661c06..39e9b3ed4 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -9918,14 +9918,6 @@ namespace Nikse.SubtitleEdit.Forms labelStartTime.Enabled = false; labelDuration.Enabled = false; } - else - { - var foreColor = Configuration.Settings.General.DarkThemeForeColor; - var slightDarker = Color.FromArgb(Math.Max(0, foreColor.R - 75), Math.Max(0, foreColor.G - 75), Math.Max(0, foreColor.B - 75)); - labelText.ForeColor = slightDarker; - labelStartTime.ForeColor = slightDarker; - labelDuration.ForeColor = slightDarker; - } textBoxListViewText.ContextMenuStrip = null; @@ -9947,14 +9939,6 @@ namespace Nikse.SubtitleEdit.Forms labelText.Enabled = true; labelStartTime.Enabled = true; labelDuration.Enabled = true; - if (Configuration.Settings.General.UseDarkTheme) - { - var foreColor = Configuration.Settings.General.DarkThemeForeColor; - labelText.ForeColor = foreColor; - labelStartTime.ForeColor = foreColor; - labelDuration.ForeColor = foreColor; - } - textBoxListViewText.ContextMenuStrip = contextMenuStripTextBoxListView; } }