Changeset 466


Ignore:
Timestamp:
Feb 22, 2023, 5:11:57 AM (2 years ago)
Author:
ataylor
Message:

Always update minimum size of font dialog to fit controls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/CustomFontDialog.PAS

    r459 r466  
    377377     TopH := H - VSplit - TxtH - 5;
    378378
    379      // Divide the top half controls at 55% of the total width
    380      TopLW := trunc( W * 0.55 );    // Width of top left area
     379     // Divide the top half controls at 50% of the total width
     380     TopLW := W div 2;              // Width of top left area
    381381     StW := W - TopLW - SzW - 10;   // Width of Style controls
    382382
     
    564564
    565565  FExampleText.Font := FEditFont;
     566
     567  // Make sure the dialog is big enough for the controls
     568  MinTrackWidth := Font.Width * 60;
     569  if MinTrackWidth < 400 then
     570    MinTrackWidth := 400;
     571
     572  MinTrackHeight := Font.Height * 20;
     573  if MinTrackHeight < 350 then
     574    MinTrackHeight := 350;
    566575
    567576  Screen.Cursor := crDefault;
Note: See TracChangeset for help on using the changeset viewer.