Hide the scrollbar

This commit is contained in:
smoogipoo 2018-06-12 15:51:48 +09:00
parent aaf2f66594
commit 3b396e38ca
1 changed files with 1 additions and 30 deletions

View File

@ -25,6 +25,7 @@ public Timeline()
ZoomDuration = 200;
ZoomEasing = Easing.OutQuint;
Zoom = 10;
ScrollbarVisible = false;
}
private WaveformGraph waveform;
@ -150,35 +151,5 @@ private void endUserDrag()
if (trackWasPlaying)
adjustableClock.Start();
}
protected override ScrollbarContainer CreateScrollbar(Direction direction) => new TimelineScrollbar(this, direction);
private class TimelineScrollbar : ScrollbarContainer
{
private readonly Timeline timeline;
public TimelineScrollbar(Timeline timeline, Direction scrollDir)
: base(scrollDir)
{
this.timeline = timeline;
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
{
if (base.OnMouseDown(state, args))
{
timeline.beginUserDrag();
return true;
}
return false;
}
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
{
timeline.endUserDrag();
return base.OnMouseUp(state, args);
}
}
}
}