MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / ScrollPixelToLeft

Method ScrollPixelToLeft

src/audio_display.cpp:616–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614}
615
616void AudioDisplay::ScrollPixelToLeft(int pixel_position)
617{
618 const int client_width = GetClientRect().GetWidth();
619
620 if (pixel_position + client_width >= pixel_audio_width)
621 pixel_position = pixel_audio_width - client_width;
622 if (pixel_position < 0)
623 pixel_position = 0;
624
625 scroll_left = pixel_position;
626 scrollbar->SetPosition(scroll_left);
627 timeline->SetPosition(scroll_left);
628 Refresh();
629}
630
631void AudioDisplay::ScrollTimeRangeInView(const TimeRange &range)
632{

Callers 2

OnMouseEventMethod · 0.80
OnMouseEventMethod · 0.80

Calls 2

GetWidthMethod · 0.45
SetPositionMethod · 0.45

Tested by

no test coverage detected