From 691d2abd577641c092c5b82d9c78d1e1839d3bbc Mon Sep 17 00:00:00 2001 From: danglassey Date: Sun, 18 Aug 2002 13:01:03 +0000 Subject: sync with crosswire 20020818-1300 --- apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp') 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 == "") -- cgit