Skip to content

Commit

Permalink
Fix scrolled content going offscreen after resize
Browse files Browse the repository at this point in the history
  • Loading branch information
Twometer committed Aug 8, 2021
1 parent dc597c5 commit 22e599a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NoFences/FenceWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ private void FenceWindow_Paint(object sender, PaintEventArgs e)
var contentHeight = Height - titleHeight;
var scrollbarHeight = contentHeight - scrollHeight;
e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(150, Color.Black)), new Rectangle(Width - 5, titleHeight + scrollOffset, 5, scrollbarHeight));

scrollOffset = Math.Min(scrollOffset, scrollHeight);
}



// Click handlers
if (shouldUpdateSelection && !hasSelectionUpdated)
Expand Down

0 comments on commit 22e599a

Please sign in to comment.