Changeset 166 for trunk/Packages/Common


Ignore:
Timestamp:
Jan 19, 2018, 10:32:39 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: Main toolbar DPI scaling.
File:
1 edited

Legend:

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

    r139 r166  
    284284  WinControl: TWinControl;
    285285  ToolBarControl: TToolBar;
    286   OldAnchors: TAnchors;
    287   OldAutoSize: Boolean;
     286  //OldAnchors: TAnchors;
     287  //OldAutoSize: Boolean;
    288288begin
    289289  //if Control is TMemo then Exit;
     
    316316        MinWidth := ScaleX(MinWidth, FromDPI.X);
    317317        MinHeight := ScaleY(MinHeight, FromDPI.Y);
    318         Width := ScaleX(Width, FromDPI.X);
     318        // Workaround to bad band width auto sizing
     319        //Width := ScaleX(Width, FromDPI.X);
     320        Width := ScaleX(Control.Width + 28, FromDPI.X);
    319321        //Control.Invalidate;
    320322      end;
     323    // Workaround for bad autosizing of coolbar
     324    if AutoSize then begin
     325      AutoSize := False;
     326      Height := ScaleY(Height, FromDPI.Y);
     327    end;
    321328    EndUpdate;
    322329  end;
Note: See TracChangeset for help on using the changeset viewer.