File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -268,14 +268,14 @@ procedure TATImageBox.MouseWheelUp(Sender: TObject; Shift: TShiftState;
268268 if (Shift = []) then
269269 begin
270270 with VertScrollBar do
271- Position:= Position - FScrollSmallStep;
271+ Position:= Max( 0 , Position - FScrollSmallStep) ;
272272 DoScroll;
273273 end
274274 else
275275 if (Shift = [FModifierMouseHorzScroll]) then
276276 begin
277277 with HorzScrollBar do
278- Position:= Position - FScrollSmallStep;
278+ Position:= Max( 0 , Position - FScrollSmallStep) ;
279279 DoScroll;
280280 end
281281 else
@@ -296,14 +296,14 @@ procedure TATImageBox.MouseWheelDown(Sender: TObject; Shift: TShiftState;
296296 if (Shift = []) then
297297 begin
298298 with VertScrollBar do
299- Position:= Position + FScrollSmallStep;
299+ Position:= Max( 0 , Min(Range-Page, Position + FScrollSmallStep)) ;
300300 DoScroll;
301301 end
302302 else
303303 if (Shift = [FModifierMouseHorzScroll]) then
304304 begin
305305 with HorzScrollBar do
306- Position:= Position + FScrollSmallStep;
306+ Position:= Max( 0 , Min(Range-Page, Position + FScrollSmallStep)) ;
307307 DoScroll;
308308 end
309309 else
You can’t perform that action at this time.
0 commit comments