summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/dialog.cxx12
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/toolbox.cxx2
3 files changed, 8 insertions, 8 deletions
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 6b9a0ced72..fc67ff976b 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -396,9 +396,9 @@ void SmFontDialog::InitColor_Impl()
#endif
ColorData nBgCol = COL_WHITE,
nTxtCol = COL_BLACK;
- if (GetDisplayBackground().GetColor().IsDark())
+ const StyleSettings &rS = GetSettings().GetStyleSettings();
+ if (rS.GetHighContrastMode())
{
- const StyleSettings &rS = GetSettings().GetStyleSettings();
nBgCol = rS.GetFieldColor().GetColor();
nTxtCol = rS.GetFieldTextColor().GetColor();
}
@@ -967,7 +967,7 @@ SmDistanceDialog::~SmDistanceDialog()
void SmDistanceDialog::ApplyImages()
{
- BOOL bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
for (int i = 0; i < NOCATEGORIES; ++i)
{
SmCategoryDesc *pCat = Categories[i];
@@ -1551,9 +1551,9 @@ void SmSymbolDialog::InitColor_Impl()
#endif
ColorData nBgCol = COL_WHITE,
nTxtCol = COL_BLACK;
- if (GetDisplayBackground().GetColor().IsDark())
+ const StyleSettings &rS = GetSettings().GetStyleSettings();
+ if (rS.GetHighContrastMode())
{
- const StyleSettings &rS = GetSettings().GetStyleSettings();
nBgCol = rS.GetFieldColor().GetColor();
nTxtCol = rS.GetFieldTextColor().GetColor();
}
@@ -2180,7 +2180,7 @@ void SmSymDefineDialog::InitColor_Impl()
#endif
ColorData nBgCol = COL_WHITE,
nTxtCol = COL_BLACK;
- BOOL bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
if (bHighContrast)
{
const StyleSettings &rS = GetSettings().GetStyleSettings();
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 48e5f8f71f..78d989081d 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -467,7 +467,7 @@ void SmDocShell::Draw(OutputDevice &rDev, Point &rPosition)
ULONG nOldDrawMode = DRAWMODE_DEFAULT;
BOOL bRestoreDrawMode = FALSE;
if (OUTDEV_WINDOW == rDev.GetOutDevType() &&
- ((Window &) rDev).GetDisplayBackground().GetColor().IsDark())
+ ((Window &) rDev).GetSettings().GetStyleSettings().GetHighContrastMode())
{
nOldDrawMode = rDev.GetDrawMode();
rDev.SetDrawMode( DRAWMODE_DEFAULT );
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index a462fd6949..de8e4d3673 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -222,7 +222,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, BOOL bHighContra
void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
{
- BOOL bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
// set image list for toolbox 'catalog'
const ImageList *pImageList = GetImageList( bHighContrast ? RID_ILH_CATALOG : RID_IL_CATALOG, bHighContrast );