Ignore:
Timestamp:
May 8, 2019, 12:11:40 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Build under Lazarus 2.0.
  • Modified: Used .lrj files instead of .lrt files.
  • Removed: TemplateGenerics package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UScaleDPI.pas

    r1 r21  
    215215  I: Integer;
    216216begin
     217  ImgList.BeginUpdate;
    217218  NewWidth := ScaleX(ImgList.Width, FromDPI.X);
    218219  NewHeight := ScaleY(ImgList.Height, FromDPI.Y);
     
    248249    Temp[i].Free;
    249250  end;
     251  ImgList.EndUpdate;
    250252end;
    251253
     
    287289  //OldAutoSize: Boolean;
    288290begin
     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
    289304  //if Control is TMemo then Exit;
    290305  //if Control is TForm then
     
    338353  end;
    339354
    340   //if not (Control is TCustomPage) then
    341   if Control is TWinControl then begin
    342     WinControl := TWinControl(Control);
    343     if WinControl.ControlCount > 0 then begin
    344       for I := 0 to WinControl.ControlCount - 1 do begin
    345         if WinControl.Controls[I] is TControl then begin
    346           ScaleControl(WinControl.Controls[I], FromDPI);
    347         end;
    348       end;
    349     end;
    350   end;
    351355  //if Control is TForm then
    352356  //  Control.EnableAutoSizing;
Note: See TracChangeset for help on using the changeset viewer.