Changeset 465


Ignore:
Timestamp:
Feb 22, 2023, 1:45:24 AM (2 years ago)
Author:
ataylor
Message:

Finish(?) implementing scale-to-font logic for NewView dialogs.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11[Ee][Nn][Vv].[Ii][Nn][Cc]
         2*.[Bb][Aa][Kk]
  • trunk/NewView/FileDialogForm.pas

    r105 r465  
    150150Procedure TFileDialogForm.FileDialogFormOnSetupShow (Sender: TObject);
    151151Begin
    152   ScaleForm( self, 11, 16 );
     152  ScaleForm( self, 10, 16 );
     153
     154  // ScaleForm seems to misposition the combo-boxes, so we fix that here
     155  DriveComboBox.Bottom := DrivesLabel.Bottom - DriveComboBox.Height;
     156  FilterComboBox.Bottom := FilterLabel.Bottom - FilterComboBox.Height;
    153157
    154158  FileNameEdit.YAlign := yaTop;
     
    163167  DriveComboBox.YAlign := yaTop;
    164168  DrivesLabel.YAlign := yaTop;
     169
    165170  DirectoryListBox.YStretch := ysFrame;
    166171  DirectoriesLabel.YAlign := yaTop;
     
    171176
    172177  LayoutControls;
     178  FileListBox.SetColumnWidth( 0, Canvas.TextWidth('A_Suitably_Long_FileName.EXT'));
     179
    173180End;
    174181
     
    366373  SplitX := round( ClientWidth * Split );
    367374  LeftPaneWidth := SplitX - 8; // note we are not including borders here
    368   RightPaneWidth := ClientWidth - SplitX - 8;
    369   RightPaneX := SplitX + 3;
     375  RightPaneWidth := ClientWidth - SplitX - 9;
     376  RightPaneX := SplitX + 4;
    370377
    371378  DrivesLabel.Width := LeftPaneWidth;
  • trunk/NewView/GlobalSearchForm.pas

    r392 r465  
    301301Procedure TGlobalSearchForm.GlobalSearchFormOnSetupShow (Sender: TObject);
    302302Begin
    303   ScaleForm( self, 11, 16 );
     303  ScaleForm( self, 8, 16 );
     304  // Fix scaling issues on some controls
     305  if SearchTextLabel1.Top > (SearchLocationComboBox.Top + 2) then
     306    SearchTextLabel1.Top := SearchLocationComboBox.Top + 2;
     307  Bevel.Bottom := ClientHeight - ResultsLabel.Top + 4;
     308  Led.Height := ResultsLabel.Height;
     309  Led.Width := Led.Height;
     310  Led.Top := ResultsLabel.Top;
     311
    304312  SearchButton.Align := alFixedRightTop;
    305313
  • trunk/NewView/MainForm.pas

    r411 r465  
    38893889  ContentsOutline.SmoothScroll := false;
    38903890
    3891   LogEvent(LogStartup, 'Choosing default font: Trying WarpSans');
     3891  LogEvent(LogStartup, 'Choosing default font: Trying Window Text setting');
    38923892
    38933893  Font := GetNiceDefaultFont;
     
    43864386  StatusPanel.Left:= 0;
    43874387  StatusPanel.Width:= ClientWidth div 2 - 2;
    4388   StatusPanel.Height := TextHeight + 2;
     4388  StatusPanel.Height := TextHeight + Font.InternalLeading + 4;
    43894389
    43904390  ProgressPanel.Left:= ClientWidth div 2 + 2;
    43914391  ProgressPanel.Width:= ClientWidth - ProgressPanel.Left;
    4392   ProgressPanel.Height := TextHeight + 2;
     4392  ProgressPanel.Height := TextHeight + Font.InternalLeading + 4;
    43934393
    43944394  Notebook.Bottom := StatusPanel.Height + 3;
     
    49654965
    49664966Procedure TMainForm.NotebookOnSetupShow (Sender: TObject);
    4967 Begin
     4967var
     4968  btnWidth: integer;
     4969  btnHeight: integer;
     4970Begin
     4971  btnWidth := Canvas.TextWidth('M') * 8;
     4972  btnHeight := trunc( Canvas.TextHeight('M') * 1.5 );
     4973
     4974  DeleteNoteButton.Width := btnWidth;
     4975  DeleteNoteButton.Height := btnHeight;
     4976  GotoNoteButton.Width := btnWidth;
     4977  GotoNoteButton.Height := btnHeight;
     4978  GotoNoteButton.Left := btnWidth + 10;
     4979  AddNoteButton.Width := btnWidth;
     4980  AddNoteButton.Height := btnHeight;
     4981  AddNoteButton.Bottom := btnHeight + 5;
     4982  EditNoteButton.Width := btnWidth;
     4983  EditNoteButton.Height := btnHeight;
     4984  EditNoteButton.Left := btnWidth + 10;
     4985  EditNoteButton.Bottom := btnHeight + 5;
     4986
    49684987  ContentsOutline.xStretch := xsFrame;
    49694988  ContentsOutline.yStretch := ysFrame;
     
    49804999  SearchResultsListBox.xStretch := xsFrame;
    49815000  SearchResultsListBox.yStretch := ysFrame;
     5001
     5002  NotesListBox.Bottom := 2 * btnHeight + 10;
     5003  NotesListBox.Height := Notebook.ClientHeight - NotesListBox.Bottom;
    49825004
    49835005  NotesListBox.xStretch := xsFrame;
  • trunk/NewView/PrintDialogUnit.pas

    r94 r465  
    6565Procedure TNewViewPrintDialog.NewViewPrintDialogOnSetupShow (Sender: TObject);
    6666Begin
    67   ScaleForm( self, 11, 16 );
     67  ScaleForm( self, 8, 16 );
     68  // ScaleForm seems to misposition the combo-box, so fix it here
     69  PrinterComboBox.Bottom := PrinterLabel.Bottom - PrinterComboBox.Height - 1;
    6870End;
    6971
  • trunk/NewView/SearchDirectoriesFormUnit.pas

    r104 r465  
    5858Procedure TSearchDirectoriesForm.SearchDirectoriesFormOnSetupShow (Sender: TObject);
    5959Begin
    60   ScaleForm( self, 11, 16 );
     60  ScaleForm( self, 8, 16 );
    6161End;
    6262
  • trunk/NewView/VersionUnit.pas

    r438 r465  
    1717
    1818const
    19   Version =        'V2.19.7'; // $SS_REQUIRE_NEW_VERSION$
     19  Version =        'V2.19.7a'; // $SS_REQUIRE_NEW_VERSION$
    2020  BldLevelVersion = '2.19.7'; // Embedded for IBM BLDLEVEL tool
    2121  CopyrightMsg = 'Copyright 2005 Aaron Lawrence; 2006-2019 Ronald Brill';
Note: See TracChangeset for help on using the changeset viewer.