Changeset 473 for trunk/Packages/DpiControls
- Timestamp:
- Dec 4, 2023, 12:13:15 PM (12 months ago)
- Location:
- trunk/Packages/DpiControls
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/DpiControls/Dpi.Common.pas
r468 r473 7 7 8 8 const 9 FixedDpi = 2*96;10 9 DpiControlsComponentPaletteName = 'DpiControls'; 11 10 -
trunk/Packages/DpiControls/Dpi.Forms.pas
r468 r473 228 228 constructor Create; 229 229 destructor Destroy; override; 230 procedure UpdateScreen;231 230 procedure UpdateActiveFormFromNativeScreen; 232 231 function DisableForms(SkipForm: TForm; DisabledList: Classes.TList = nil): Classes.TList; 233 232 procedure EnableForms(var AFormList: Classes.TList); 233 function GetSystemDpi: Integer; 234 234 property FormCount: Integer read GetFormCount; 235 235 property Forms[Index: Integer]: TForm read GetForms; … … 400 400 begin 401 401 GetNativeApplication.Initialize; 402 Screen.UpdateScreen;403 402 end; 404 403 … … 442 441 FCreatingForm := TForm(Instance); 443 442 Instance.Create(Self); 444 Ok := true;443 Ok := True; 445 444 finally 446 445 if not Ok then begin … … 978 977 end; 979 978 979 function TScreen.GetSystemDpi: Integer; 980 begin 981 Result := LCLScreen.PixelsPerInch; 982 end; 983 980 984 constructor TScreen.Create; 981 985 begin … … 993 997 FreeAndNil(FPrevActiveForms); 994 998 inherited; 995 end;996 997 procedure TScreen.UpdateScreen;998 begin999 if FixedDpi = -1 then Dpi := LCLScreen.PixelsPerInch1000 else Dpi := FixedDpi;1001 999 end; 1002 1000
Note:
See TracChangeset
for help on using the changeset viewer.