summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-09-23 11:11:14 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-09-23 11:11:14 +0000
commitd6442ff3816621a5ae3a41e87fba7c6d2964a956 (patch)
tree35fc1fd268422ee58f891ad5f9d90c97f8b4534b /src
parent4766f99a0cc9b40b5aef35323265e0d238a76b4b (diff)
downloadfpGUI-d6442ff3816621a5ae3a41e87fba7c6d2964a956.tar.xz
Minor improvement to the Font Select dialog. It now remembers your custom sample text between font attribute changes.
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui_dialogs.pas7
1 files changed, 7 insertions, 0 deletions
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;