From 5efd3c588b431ea98e155f3feca91b80d03ff151 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 3 Nov 2009 18:12:19 +0100 Subject: #i104678# use high contrast mode setting instead of IsDark (paradigm shift begun with issue i35482) --- dbaccess/source/ui/browser/unodatbr.cxx | 2 +- dbaccess/source/ui/control/dbtreelistbox.cxx | 2 +- dbaccess/source/ui/dlg/indexdialog.cxx | 2 +- dbaccess/source/ui/misc/ToolBoxHelper.cxx | 6 +++--- dbaccess/source/ui/misc/UITools.cxx | 2 +- reportdesign/source/ui/report/ReportSection.cxx | 2 +- reportdesign/source/ui/report/StartMarker.cxx | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 8f2528e1f96a..aad25f1cd7ab 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -3608,7 +3608,7 @@ sal_Bool SbaTableQueryBrowser::isHiContrast() const RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaTableQueryBrowser::isHiContrast" ); sal_Bool bRet = sal_False; if ( m_pTreeView ) - bRet = m_pTreeView->getListBox().GetBackground().GetColor().IsDark(); + bRet = m_pTreeView->getListBox().GetSettings().GetStyleSettings().GetHighContrastMode(); return bRet; } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index a11d39bdba04..b5bc5f817198 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -568,7 +568,7 @@ namespace void lcl_insertMenuItemImages( Menu& _rMenu, IController& _rCommandController ) { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - const BOOL bHiContrast = rSettings.GetMenuColor().IsDark(); + const BOOL bHiContrast = rSettings.GetHighContrastMode(); uno::Reference< frame::XController > xController = _rCommandController.getXController(); uno::Reference< frame::XFrame> xFrame; if ( xController.is() ) diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index ea082491e85b..1d9dfba5623e 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -342,7 +342,7 @@ DBG_NAME(DbaIndexDialog) //------------------------------------------------------------------ void DbaIndexDialog::fillIndexList() { - sal_Bool bHiContrast = GetBackground().GetColor().IsDark(); + sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); Image aPKeyIcon(ModuleRes( bHiContrast ? IMG_PKEYICON_SCH : IMG_PKEYICON)); // fill the list with the index names m_aIndexes.Clear(); diff --git a/dbaccess/source/ui/misc/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx index bfb5f9cf4dab..8982ae4571da 100644 --- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx +++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx @@ -79,10 +79,10 @@ namespace dbaui { sal_Int16 nCurSymbolsSize = SvtMiscOptions().GetCurrentSymbolsSize(); if ( nCurSymbolsSize != m_nSymbolsSize || - m_bIsHiContrast != m_pToolBox->GetBackground().GetColor().IsDark() ) + m_bIsHiContrast != m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode() ) { m_nSymbolsSize = nCurSymbolsSize; - m_bIsHiContrast = m_pToolBox->GetBackground().GetColor().IsDark(); + m_bIsHiContrast = m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode(); m_pToolBox->SetImageList( getImageList(m_nSymbolsSize,m_bIsHiContrast) ); @@ -131,7 +131,7 @@ namespace dbaui m_pToolBox = _pTB; if ( m_pToolBox ) { - // m_bIsHiContrast = m_pToolBox->GetBackground().GetColor().IsDark(); + // m_bIsHiContrast = m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode(); ConfigOptionsChanged(NULL); if ( bFirstTime ) adjustToolBoxSize(m_pToolBox); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 25a6299bae12..20cb7cb9308e 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1326,7 +1326,7 @@ sal_Bool isHiContrast(Window* _pWindow) else break; } - return pIter && pIter->GetBackground().GetColor().IsDark(); + return pIter && pIter->GetSettings().GetStyleSettings().GetHighContrastMode(); } // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 2055f1ee5358..ea04c7c2d300 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -505,7 +505,7 @@ void OReportSection::Command( const CommandEvent& _rCEvt ) case COMMAND_CONTEXTMENU: { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - BOOL bHiContrast = rSettings.GetMenuColor().IsDark(); + BOOL bHiContrast = rSettings.GetHighContrastMode(); OReportController& rController = m_pParent->getViewsWindow()->getView()->getReportView()->getController(); uno::Reference xFrame = rController.getFrame(); PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) ); diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index d87f7464a140..5a22e9cff5ed 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -194,7 +194,7 @@ void OStartMarker::MouseButtonUp( const MouseEvent& rMEvt ) void OStartMarker::changeImage() { Image* pImage = NULL; - if ( GetDisplayBackground().GetColor().IsDark() ) + if ( GetSettings().GetStyleSettings().GetHighContrastMode() ) pImage = m_bCollapsed ? s_pDefCollapsedHC : s_pDefExpandedHC; else pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded; @@ -212,7 +212,7 @@ void OStartMarker::initDefaultNodeImages() } Image* pImage = NULL; - if ( GetDisplayBackground().GetColor().IsDark() ) + if ( GetSettings().GetStyleSettings().GetHighContrastMode() ) { pImage = m_bCollapsed ? s_pDefCollapsedHC : s_pDefExpandedHC; } -- cgit v1.2.3