- Timestamp:
- Sep 13, 2024, 8:35:17 PM (2 months ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/PVSB.pas
r610 r611 27 27 public 28 28 ScrollBar: TScrollBar; 29 WheelSteps: Integer; 29 30 constructor Create(Parent: TWinControl); 30 31 destructor Destroy; override; … … 106 107 NewPos: Integer; 107 108 begin 108 if Max < ScrollBar.PageSize then Result := False 109 else begin 110 NewPos := ScrollBar.Position - Delta div 30; 111 if NewPos < 0 then NewPos := 0; 112 if NewPos > Max - ScrollBar.PageSize + 1 then 113 NewPos := Max - ScrollBar.PageSize + 1; 114 Result := NewPos <> ScrollBar.Position; 115 if NewPos <> ScrollBar.Position then begin 116 ScrollBar.Position := NewPos; 117 end; 109 if Max < ScrollBar.PageSize then Result := False 110 else begin 111 NewPos := ScrollBar.Position - Delta div (120 div WheelSteps); 112 if NewPos < 0 then NewPos := 0; 113 if NewPos > Max - ScrollBar.PageSize + 1 then 114 NewPos := Max - ScrollBar.PageSize + 1; 115 Result := NewPos <> ScrollBar.Position; 116 if NewPos <> ScrollBar.Position then begin 117 ScrollBar.Position := NewPos; 118 118 end; 119 end; 119 120 end; 120 121 … … 190 191 ScrollBar.Parent := Parent; 191 192 ScrollBar.Width := 16; 193 WheelSteps := 4; 192 194 end; 193 195 -
trunk/LocalPlayer/Term.pas
r610 r611 1744 1744 1745 1745 VerticalScrollBar := TPVScrollbar.Create(Self); 1746 VerticalScrollBar.WheelSteps := 1; 1746 1747 VerticalScrollBar.OnUpdate := ScrollBarUpdate; 1747 1748 end;
Note:
See TracChangeset
for help on using the changeset viewer.