mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 05:02:36 +01:00
Merge pull request #4990 from OmrSi/current-position-tooltip-flicker-patch
Try to fix current position flickering issue
This commit is contained in:
commit
bf6f5abfd0
@ -123,6 +123,8 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
private readonly Label _labelVideoPlayerName = new Label();
|
||||
private readonly Label _labelVolume = new Label();
|
||||
private readonly ToolTip _currentPositionToolTip = new ToolTip();
|
||||
private int _lastCurrentPositionToolTipX;
|
||||
private int _lastCurrentPositionToolTipY;
|
||||
private List<MatroskaChapter> _chapters = null;
|
||||
|
||||
public List<MatroskaChapter> Chapters
|
||||
@ -1788,7 +1790,12 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
if (VideoPlayer != null)
|
||||
{
|
||||
string toolTiptext = CurrentPositionToolTipText(e.X - 4);
|
||||
_currentPositionToolTip.Show(toolTiptext, _pictureBoxProgressbarBackground, e.X - 10, e.Y - 25);
|
||||
if (e.X != _lastCurrentPositionToolTipX || e.Y != _lastCurrentPositionToolTipY)
|
||||
{
|
||||
_currentPositionToolTip.Show(toolTiptext, _pictureBoxProgressbarBackground, e.X - 10, e.Y - 25);
|
||||
_lastCurrentPositionToolTipX = e.X;
|
||||
_lastCurrentPositionToolTipY = e.Y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user