mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Merge pull request #544 from simplyWiri/timeline-scrolling-tweak
Clamp scrolling to the difference between the deepest zone near the m…
This commit is contained in:
commit
4c0e6fe3ca
@ -160,7 +160,7 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, bool
|
|||||||
|
|
||||||
if( const auto scrollY = CalculateScrollPosition() )
|
if( const auto scrollY = CalculateScrollPosition() )
|
||||||
{
|
{
|
||||||
int clampedScrollY = std::min<int>( *scrollY, yOffset );
|
int clampedScrollY = std::min<int>( *scrollY, std::max<int>( yOffset - ImGui::GetWindowHeight(), 0 ) );
|
||||||
ImGui::SetScrollY( clampedScrollY );
|
ImGui::SetScrollY( clampedScrollY );
|
||||||
int minHeight = ImGui::GetWindowHeight() + clampedScrollY;
|
int minHeight = ImGui::GetWindowHeight() + clampedScrollY;
|
||||||
yOffset = std::max( yOffset, minHeight );
|
yOffset = std::max( yOffset, minHeight );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user