aboutsummaryrefslogtreecommitdiffstats
path: root/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
diff options
context:
space:
mode:
authordanglassey <danglassey>2002-08-18 13:01:03 +0000
committerdanglassey <danglassey>2002-08-18 13:01:03 +0000
commit691d2abd577641c092c5b82d9c78d1e1839d3bbc (patch)
tree5e39ce9fbad9f4cdb89a5bf8ca36e8c6c5b88112 /apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
parent8c4b02a3cf294b2126d0f36269c26c104d9d9a74 (diff)
downloadsword-sf-cvs-691d2abd577641c092c5b82d9c78d1e1839d3bbc.tar.gz
sync with crosswire 20020818-1300
Diffstat (limited to 'apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp')
-rw-r--r--apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp b/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
index 58f0e80..48db473 100644
--- a/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
+++ b/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
@@ -569,11 +569,20 @@ void TRxRichEditX::getDisplayPrefs(DISP_ATTRIBS *attribs, SWModule *module /*, c
if (attribs->fontName == "")
attribs->fontName = "MS Sans Serif";
- string keyFontSize = (string)getType().c_str() + "FontSize";
- string fontSize = Form1->optionsconf->Sections["Appearance"][keyFontSize];
+
+ // If the module uses it's own font size load that else we will try the config file else we will use the default
+ AnsiString fontSize;
+ eit = module->getConfig().find("FontSize");
+ if (eit != module->getConfig().end())
+ fontSize = (*eit).second.c_str();
+ else {
+ string keyFontSize = (string)getType().c_str() + "FontSize";
+ fontSize = (AnsiString)Form1->optionsconf->Sections["Appearance"][keyFontSize].c_str();
+ }
+ // If we still have no size we will set it to a default value
if (fontSize == "")
attribs->fontSize = 10;
- else attribs->fontSize = StrToInt((AnsiString)fontSize.c_str());
+ else attribs->fontSize = StrToInt(fontSize);
string entryColor = Form1->optionsconf->Sections["Appearance"]["CurrentVSColor"];
if (entryColor == "")