summaryrefslogtreecommitdiff
path: root/docview
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-09-01 10:23:29 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-09-01 10:23:29 +0200
commit4565b938528740ad354890c2a9ca2f9d197b748b (patch)
treef18131d8049a7e830c3f76f99c7444f01078225d /docview
parentf6d03c0c8b3f8090270deb449a2affb8d7707303 (diff)
downloadfpGUI-4565b938528740ad354890c2a9ca2f9d197b748b.tar.xz
docview settings: NormalFont and FixedFont are now font descriptions only
Diffstat (limited to 'docview')
-rw-r--r--docview/src/SettingsUnit.pas33
1 files changed, 10 insertions, 23 deletions
diff --git a/docview/src/SettingsUnit.pas b/docview/src/SettingsUnit.pas
index 903e9fe7..5c441059 100644
--- a/docview/src/SettingsUnit.pas
+++ b/docview/src/SettingsUnit.pas
@@ -67,9 +67,6 @@ Const
ApplicationFontIndex = 0;
NumFontSettings = 1;
- DefaultTopicFont = DefaultTopicFont + '-' + DefaultTopicFontSize;
- DefaultTopicFixedFont = DefaultTopicFixedFont + '-10' + DefaultTopicFixedFontSize;
-
Type
TIndexStyle = ( isAlphabetical, isFileOnly, isFull );
@@ -95,8 +92,8 @@ Type
ShowLeftPanel: boolean;
FileDialogSplit: Double;
Colors: array[ 0..NumColorSettings - 1 ] of TfpgColor;
- NormalFont: TfpgFont;
- FixedFont: TfpgFont;
+ NormalFontDesc: TfpgString;
+ FixedFontDesc: TfpgString;
Fonts: array[ 0..NumFontSettings - 1 ] of TfpgFont;
FixedFontSubstitution: boolean;
FixedFontSubstitutes: string;
@@ -226,13 +223,8 @@ begin
end;
// Fonts
- NormalFont := fpgGetFont(ReadString(FontsSection, 'NormalFont', DefaultTopicFont));
- if NormalFont = nil then
- NormalFont := fpgStyle.DefaultFont;
-
- FixedFont := fpgGetFont(ReadString(FontsSection, 'FixedFont', DefaultTopicFixedFont));
- if FixedFont = nil then
- FixedFont := fpgStyle.FixedFont;
+ NormalFontDesc := ReadString(FontsSection, 'NormalFont', DefaultTopicFont);
+ FixedFontDesc := ReadString(FontsSection, 'FixedFont', DefaultTopicFixedFont);
for i := 0 to NumFontSettings - 1 do
begin
@@ -243,7 +235,7 @@ begin
end;
FixedFontSubstitution := ReadBool( FontsSection, 'FixedFontSubstitution', true );
- FixedFontSubstitutes := ReadString( FontsSection, 'FixedFontSubstitutes', 'Mono-10' );
+ FixedFontSubstitutes := ReadString( FontsSection, 'FixedFontSubstitutes', DefaultTopicFixedFont );
// Index style
SettingString := ReadString( GeneralSection, 'IndexStyle', 'Full' );
@@ -357,8 +349,8 @@ begin
end;
// Fonts
- WriteString( FontsSection, 'NormalFont', NormalFont.FontDesc );
- WriteString( FontsSection, 'FixedFont', FixedFont.FontDesc );
+ WriteString( FontsSection, 'NormalFont', NormalFontDesc );
+ WriteString( FontsSection, 'FixedFont', FixedFontDesc );
for FontIndex := 0 to NumFontSettings - 1 do
begin
FontName := 'Font' + IntToStr( FontIndex );
@@ -488,8 +480,8 @@ Begin
aStrings.Add('ShowLeftPanel: ' + boolToStr(Settings.ShowLeftPanel));
// FileDialogSplit: real;
// Colors: array[ 0..NumColorSettings - 1 ] of TColor;
- // NormalFont: TFont;
- // FixedFont: TFont;
+ aStrings.Add('NormalFont: ' + Settings.NormalFontDesc);
+ aStrings.Add('FixedFont: ' + Settings.FixedFontDesc);
// Fonts: array[ 0..NumFontSettings - 1 ] of TFont;
aStrings.Add('FixedFontSubstitution: ' + boolToStr(Settings.FixedFontSubstitution));
aStrings.Add('FixedFontSubstitutes: ' + Settings.FixedFontSubstitutes);
@@ -508,14 +500,9 @@ end;
Initialization
Settings.MRUList := TObjectList.Create;
-
- //Settings.NormalFont := fpgStyle.DefaultFont;
- //Settings.FixedFont := fpgStyle.FixedFont;
- //Settings.SearchDirectories := TStringList.Create;
+ Settings.SearchDirectories := TStringList.Create;
Finalization
- Settings.NormalFont.Free;
- Settings.FixedFont.Free;
Settings.SearchDirectories.Free;
Settings.MRUList.Free;