mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Work on WebVTT
This commit is contained in:
parent
69330fe43a
commit
32146220a8
@ -385,10 +385,14 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
text = text.Remove(idx, 4);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (text.Contains("<c."))
|
||||
{
|
||||
text = text.Replace("." + style.Name, string.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = "<c." + style.Name + ">" + text + "</c>";
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
@ -478,6 +478,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
}
|
||||
else if (uiFormat.Name == WebVTT.NameOfFormat || uiFormat.Name == WebVTTFileWithLineNumber.NameOfFormat)
|
||||
{
|
||||
//TODO: add some caching!?
|
||||
var defaultStyle = GetMpvPreviewStyle(Configuration.Settings.General);
|
||||
defaultStyle.BorderStyle = "3";
|
||||
subtitle = new Subtitle(subtitle);
|
||||
|
@ -14052,7 +14052,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
var c = ColorTranslator.FromHtml(color);
|
||||
var styleWithColor = WebVttHelper.AddStyleFromColor(c);
|
||||
subtitle.Header = WebVttHelper.AddStyleToHeader(_subtitle.Header, styleWithColor);
|
||||
WebVttHelper.AddStyleToText(p.Text, styleWithColor);
|
||||
p.Text = WebVttHelper.AddStyleToText(p.Text, styleWithColor);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user