Changeset 21 for trunk/Packages/Common/UScaleDPI.pas
- Timestamp:
- May 8, 2019, 12:11:40 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UScaleDPI.pas
r1 r21 215 215 I: Integer; 216 216 begin 217 ImgList.BeginUpdate; 217 218 NewWidth := ScaleX(ImgList.Width, FromDPI.X); 218 219 NewHeight := ScaleY(ImgList.Height, FromDPI.Y); … … 248 249 Temp[i].Free; 249 250 end; 251 ImgList.EndUpdate; 250 252 end; 251 253 … … 287 289 //OldAutoSize: Boolean; 288 290 begin 291 //if not (Control is TCustomPage) then 292 // Resize childs first 293 if Control is TWinControl then begin 294 WinControl := TWinControl(Control); 295 if WinControl.ControlCount > 0 then begin 296 for I := 0 to WinControl.ControlCount - 1 do begin 297 if WinControl.Controls[I] is TControl then begin 298 ScaleControl(WinControl.Controls[I], FromDPI); 299 end; 300 end; 301 end; 302 end; 303 289 304 //if Control is TMemo then Exit; 290 305 //if Control is TForm then … … 338 353 end; 339 354 340 //if not (Control is TCustomPage) then341 if Control is TWinControl then begin342 WinControl := TWinControl(Control);343 if WinControl.ControlCount > 0 then begin344 for I := 0 to WinControl.ControlCount - 1 do begin345 if WinControl.Controls[I] is TControl then begin346 ScaleControl(WinControl.Controls[I], FromDPI);347 end;348 end;349 end;350 end;351 355 //if Control is TForm then 352 356 // Control.EnableAutoSizing;
Note:
See TracChangeset
for help on using the changeset viewer.