Minor fix for theme

This commit is contained in:
niksedk 2022-09-25 19:19:01 +02:00
parent 6108f31f66
commit 5d7105557b
2 changed files with 7 additions and 4 deletions

View File

@ -318,6 +318,8 @@ namespace Nikse.SubtitleEdit.Forms
textBoxListViewText.BackColor = !IsSubtitleLoaded ? SystemColors.ActiveBorder : SystemColors.WindowFrame;
textBoxListViewTextOriginal.BackColor = !IsSubtitleLoaded ? SystemColors.ActiveBorder : SystemColors.WindowFrame;
timeUpDownStartTime.Theme();
timeUpDownVideoPosition.Theme();
timeUpDownVideoPositionAdjust.Theme();
if (Application.RenderWithVisualStyles && !Configuration.Settings.General.UseDarkTheme)
{
@ -5663,6 +5665,8 @@ namespace Nikse.SubtitleEdit.Forms
SubtitleListview1.ForeColor = Configuration.Settings.General.SubtitleFontColor;
SubtitleListview1.BackColor = Configuration.Settings.General.SubtitleBackgroundColor;
timeUpDownStartTime.Theme();
timeUpDownVideoPosition.Theme();
timeUpDownVideoPositionAdjust.Theme();
SaveSubtitleListviewIndices();
UiUtil.InitializeSubtitleFont(SubtitleListview1);

View File

@ -976,19 +976,18 @@ namespace Nikse.SubtitleEdit.Logic
return new SolidBrush(SelectedTabColor);
}
bool isHighlighted = _tabRects[index].Contains(_mouseCursor);
var isHighlighted = _tabRects[index].Contains(_mouseCursor);
return isHighlighted
? new SolidBrush(HighlightedTabColor)
: new SolidBrush(BackColor);
}
private Pen GetBorderPen() =>
new Pen(SystemBrushes.ControlDark, BorderWidth);
private static Pen GetBorderPen() => new Pen(SystemBrushes.ControlDark, BorderWidth);
}
private static void SetStyle(Control control, ControlStyles styles, bool value) =>
typeof(TabControl).GetMethod("SetStyle", BindingFlags.Instance | BindingFlags.NonPublic)
.Invoke(control, new object[] { styles, value });
?.Invoke(control, new object[] { styles, value });
internal static void SetDarkTheme(ToolStripItem item)
{