Changeset 178 for branches/highdpi/LocalPlayer/PVSB.pas
- Timestamp:
- Jun 23, 2019, 3:15:29 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/PVSB.pas
r172 r178 9 9 {$ENDIF} 10 10 Classes, Controls, Forms, LCLIntf, LCLType, LMessages, Messages, SysUtils, 11 StdCtrls, Math ;11 StdCtrls, Math, UDpiControls; 12 12 13 13 type … … 18 18 private 19 19 FOnUpdate: TNotifyEvent; 20 ScrollBar: T ScrollBar;20 ScrollBar: TDpiScrollBar; 21 21 FMax: Integer; 22 22 function GetMax: Integer; … … 28 28 procedure SetPosition(AValue: Integer); 29 29 public 30 constructor Create(Parent: T WinControl);30 constructor Create(Parent: TDpiWinControl); 31 31 destructor Destroy; override; 32 32 procedure Init(Max, PageSize: Integer); … … 109 109 if Max < ScrollBar.PageSize then Result := False 110 110 else begin 111 NewPos := ScrollBar.Position - Delta div 30 ;111 NewPos := ScrollBar.Position - Delta div 300; 112 112 if NewPos < 0 then NewPos := 0; 113 113 if NewPos > Max - ScrollBar.PageSize + 1 then … … 153 153 begin 154 154 FMax := AValue; 155 ScrollBar.Max := Math.Max(0, FMax);155 ScrollBar.Max := Math.Max(0, Max{$IFDEF LINUX} - PageSize + 1{$ENDIF}); 156 156 end; 157 157 … … 181 181 end; 182 182 183 constructor TPVScrollBar.Create(Parent: T WinControl);183 constructor TPVScrollBar.Create(Parent: TDpiWinControl); 184 184 begin 185 185 Inc(Count); 186 ScrollBar := T ScrollBar.Create(Parent);186 ScrollBar := TDpiScrollBar.Create(Parent); 187 187 ScrollBar.Kind := sbVertical; 188 188 ScrollBar.Name := 'PVSB' + IntToStr(Count);
Note:
See TracChangeset
for help on using the changeset viewer.