Changeset 470


Ignore:
Timestamp:
Mar 2, 2023, 1:57:29 AM (2 years ago)
Author:
ataylor
Message:

Adjustments to dialog scaling logic.

Location:
trunk/Components
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/ACLDialogs.pas

    r401 r470  
    356356procedure TACLQueryDialog.SetupShow;
    357357begin
    358   ScaleForm( self, 11, 16 );
     358  ScaleForm( self, 8, 16 );
    359359  FOKButton.Default := true;
    360360  FEdit.Focus;
  • trunk/Components/ControlsUtility.pas

    r464 r470  
    757757  UseWidth: double;
    758758  UseHeight: double;
    759 begin
     759  InitW: longint;
     760  InitH: longint;
     761begin
     762  InitW := Form.Width;
     763  InitH := Form.Height;
     764
    760765  if ScaledForms.IndexOf( Form ) <> -1 then
    761766    // already scaled this form.
     
    778783                XFactor,
    779784                YFactor );
     785
     786  // Adjust the bottom left position by half of the width/height increase
     787  if Form.Position in [ poDefault, poDefaultPosOnly, poScreenCenter ] then
     788  begin
     789    Form.Left := Form.Left - (( Form.Width - InitW ) div 2 );
     790    Form.Bottom := Form.Bottom - (( Form.Height - InitH ) div 2 );
     791  end;
    780792
    781793end;
Note: See TracChangeset for help on using the changeset viewer.