UI tweak and optimization

This commit is contained in:
MBucari
2025-07-16 23:31:34 -06:00
parent 747451d243
commit 8d7872a376
2 changed files with 35 additions and 62 deletions

View File

@@ -165,13 +165,13 @@ namespace LibationWinForms.ProcessQueue
else
{
vScrollBar1.Enabled = true;
vScrollBar1.LargeChange = LargeScrollChange;
//https://stackoverflow.com/a/2882878/3335599
int newMaximum = VirtualHeight + vScrollBar1.LargeChange - 1;
int newMaximum = VirtualHeight + LargeScrollChange - 1;
if (newMaximum < vScrollBar1.Maximum)
vScrollBar1.Value = Math.Max(vScrollBar1.Value - (vScrollBar1.Maximum - newMaximum), 0);
vScrollBar1.Maximum = newMaximum;
vScrollBar1.LargeChange = LargeScrollChange;
}
}