Ignore:
Timestamp:
Aug 9, 2018, 3:43:27 PM (6 years ago)
Author:
chronos
Message:
  • Modified: Update Common package.
  • Fixed: Remember forms dimensions after application restart.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/generator/Packages/Common/UScaleDPI.pas

    r114 r167  
    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
     
    284286  WinControl: TWinControl;
    285287  ToolBarControl: TToolBar;
    286   OldAnchors: TAnchors;
    287   OldAutoSize: Boolean;
     288  //OldAnchors: TAnchors;
     289  //OldAutoSize: Boolean;
    288290begin
    289291  //if Control is TMemo then Exit;
     
    316318        MinWidth := ScaleX(MinWidth, FromDPI.X);
    317319        MinHeight := ScaleY(MinHeight, FromDPI.Y);
    318         Width := ScaleX(Width, FromDPI.X);
     320        // Workaround to bad band width auto sizing
     321        //Width := ScaleX(Width, FromDPI.X);
     322        Width := ScaleX(Control.Width + 28, FromDPI.X);
    319323        //Control.Invalidate;
    320324      end;
     325    // Workaround for bad autosizing of coolbar
     326    if AutoSize then begin
     327      AutoSize := False;
     328      Height := ScaleY(Height, FromDPI.Y);
     329      AutoSize := True;
     330    end;
    321331    EndUpdate;
    322332  end;
Note: See TracChangeset for help on using the changeset viewer.