Changeset 465 for branches/highdpi/LocalPlayer/PVSB.pas
- Timestamp:
- Nov 30, 2023, 10:16:14 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/PVSB.pas
r349 r465 5 5 6 6 uses 7 UDpiControls, {$IFDEF WINDOWS} 8 Windows, 9 {$ENDIF} 7 UDpiControls, {$IFDEF WINDOWS}Windows,{$ENDIF} 10 8 Classes, Controls, Forms, LCLIntf, LCLType, LMessages, Messages, SysUtils, 11 9 StdCtrls, Math; … … 32 30 procedure Init(Max, PageSize: Integer); 33 31 procedure SetPos(Pos: Integer); 34 function Process(const Msg: TMessage): boolean;32 function Process(const Msg: TMessage): Boolean; 35 33 function ProcessMouseWheel(Delta: Integer): Boolean; 36 procedure Show(Visible: boolean);34 procedure Show(Visible: Boolean); 37 35 procedure EndSB; 38 36 procedure SetBorderSpacing(Top, Right, Bottom: Integer); … … 65 63 end; 66 64 67 function TPVScrollBar.Process(const Msg: TMessage): boolean;65 function TPVScrollBar.Process(const Msg: TMessage): Boolean; 68 66 var 69 NewPos: integer;67 NewPos: Integer; 70 68 begin 71 69 if Max < ScrollBar.PageSize then 72 result := false70 Result := False 73 71 else 74 72 begin 75 73 if (Msg.wParam and $ffff) in [SB_THUMBPOSITION, SB_THUMBTRACK] then 76 74 begin 77 result := ((Msg.wParam shr 16) and $ffff) <> ScrollBar.Position;75 Result := ((Msg.wParam shr 16) and $ffff) <> ScrollBar.Position; 78 76 ScrollBar.Position := (Msg.wParam shr 16) and $ffff; 79 77 end else begin … … 94 92 if NewPos > Max - ScrollBar.PageSize + 1 then 95 93 NewPos := Max - ScrollBar.PageSize + 1; 96 result := NewPos <> ScrollBar.Position;94 Result := NewPos <> ScrollBar.Position; 97 95 if (NewPos <> ScrollBar.Position) or ((Msg.wParam and $ffff) = SB_ENDSCROLL) then 98 96 begin … … 105 103 function TPVScrollBar.ProcessMouseWheel(Delta: Integer): Boolean; 106 104 var 107 NewPos: integer;105 NewPos: Integer; 108 106 begin 109 107 if Max < ScrollBar.PageSize then Result := False … … 120 118 end; 121 119 122 procedure TPVScrollBar.Show(Visible: boolean);120 procedure TPVScrollBar.Show(Visible: Boolean); 123 121 begin 124 122 if not Visible or (Max < ScrollBar.PageSize) then
Note:
See TracChangeset
for help on using the changeset viewer.