From d6442ff3816621a5ae3a41e87fba7c6d2964a956 Mon Sep 17 00:00:00 2001 From: graemeg Date: Tue, 23 Sep 2008 11:11:14 +0000 Subject: Minor improvement to the Font Select dialog. It now remembers your custom sample text between font attribute changes. --- src/gui/gui_dialogs.pas | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/gui/gui_dialogs.pas b/src/gui/gui_dialogs.pas index f177f597..8f6a6f24 100644 --- a/src/gui/gui_dialogs.pas +++ b/src/gui/gui_dialogs.pas @@ -128,6 +128,7 @@ type memSample: TfpgMemo; procedure OnCollectionChanged(Sender: TObject); procedure OnParamChange(Sender: TObject); + procedure OnSameTextChanged(Sender: TObject); procedure CreateFontList; procedure CreateFontAliasList; procedure SetupUI(AMode: Byte); @@ -535,6 +536,11 @@ begin memSample.Lines.Add(fpgGetNamedFontDesc(UTF8Copy(fdesc, 2, UTF8Length(fdesc)-1))); end; +procedure TfpgFontSelectDialog.OnSameTextChanged(Sender: TObject); +begin + FSampleText := memSample.Text; +end; + procedure TfpgFontSelectDialog.CreateFontList; var fl: TStringList; @@ -884,6 +890,7 @@ begin SetPosition(8, 288, 584, 65); Text := FSampleText; Anchors := [anLeft, anTop, anRight, anBottom]; + OnChange := @OnSameTextChanged; end; CreateFontList; -- cgit v1.2.3-70-g09d2