Changeset 308 for branches/highdpi/Packages/DpiControls/UDpiControls.pas
- Timestamp:
- Mar 9, 2021, 9:13:07 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Packages/DpiControls/UDpiControls.pas
r303 r308 9 9 Controls, StdCtrls, fgl, Graphics, ComCtrls, ExtCtrls, LCLType, GraphType, 10 10 Types, CustApp, LMessages, LCLIntf, Menus, Math, UPixelPointer2; 11 12 const 13 FixedDpi = -1; 11 14 12 15 type … … 1071 1074 function ScaleToNative(Value: Integer): Integer; 1072 1075 begin 1073 Result := Round(Value * DpiScreen.Dpi / 96);1076 Result := Trunc(Value * DpiScreen.Dpi / 96); 1074 1077 end; 1075 1078 … … 3068 3071 procedure TDpiScreen.UpdateScreen; 3069 3072 begin 3070 Dpi := Screen.PixelsPerInch; 3073 if FixedDpi = -1 then Dpi := Screen.PixelsPerInch 3074 else Dpi := FixedDpi; 3071 3075 end; 3072 3076
Note:
See TracChangeset
for help on using the changeset viewer.