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:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11[Ee][Nn][Vv].[Ii][Nn][Cc]
         2*.[Bb][Aa][Kk]
  • 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;
Note: See TracChangeset for help on using the changeset viewer.