diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2009-11-03 18:12:19 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2009-11-03 18:12:19 +0100 |
commit | 6ce14717d50ed3fad1f5879faf5d034aaf8f3d3b (patch) | |
tree | 182115467e5711a741578dc7440731deb6d1c5d4 /svtools | |
parent | Create DEV300_m63 milestone tag from trunk@277194 (diff) | |
download | core-6ce14717d50ed3fad1f5879faf5d034aaf8f3d3b.tar.gz core-6ce14717d50ed3fad1f5879faf5d034aaf8f3d3b.zip |
#i104678# use high contrast mode setting instead of IsDark (paradigm shift begun with issue i35482)
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 12 | ||||
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/ivctrl.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/svlbitm.cxx | 3 | ||||
-rw-r--r-- | svtools/source/contnr/svtreebx.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/templwin.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 3 | ||||
-rw-r--r-- | svtools/source/dialogs/printdlg.cxx | 2 | ||||
-rw-r--r-- | svtools/source/uno/contextmenuhelper.cxx | 2 | ||||
-rw-r--r-- | svtools/source/uno/toolboxcontroller.cxx | 2 |
10 files changed, 12 insertions, 24 deletions
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 086e00674a8e..36a798d666cd 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -70,17 +70,7 @@ namespace svt sal_Bool isHiContrast(Window* _pWindow) { OSL_ENSURE(_pWindow,"Window must be not null!"); - Window* pIter = _pWindow; - // while( pIter && pIter->GetBackground().GetColor().GetColor() == COL_TRANSPARENT ) - while( pIter ) - { - const Color& aColor = pIter->GetBackground().GetColor(); - if ( aColor.GetColor() == COL_TRANSPARENT ) - pIter = pIter->GetParent(); - else - break; - } - return pIter && pIter->GetBackground().GetColor().IsDark(); + return _pWindow && _pWindow->GetSettings().GetStyleSettings().GetHighContrastMode(); } //.............................................................. diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 274557051c27..243856a8e15a 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -167,7 +167,7 @@ namespace static sal_Bool isHighContrast( const Window* _pView ) { - return _pView->GetDisplayBackground().GetColor().IsDark(); + return _pView->GetSettings().GetStyleSettings().GetHighContrastMode(); } // ----------------------------------------------------------------------- diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index c0f40fd306df..b3b5829b479e 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -201,7 +201,7 @@ BOOL SvtIconChoiceCtrl::EditingEntry( SvxIconChoiceCtrlEntry* ) } void SvtIconChoiceCtrl::DrawEntryImage( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, OutputDevice& rDev ) { - rDev.DrawImage ( rPos, GetDisplayBackground().GetColor().IsDark() ? pEntry->GetImageHC() : pEntry->GetImage() ); + rDev.DrawImage( rPos, GetSettings().GetStyleSettings().GetHighContrastMode() ? pEntry->GetImageHC() : pEntry->GetImage() ); } String SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, BOOL ) { diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index ccd98e6a32a1..e9125b7fb2e1 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -590,8 +590,7 @@ void SvLBoxContextBmp::Paint( const Point& _rPos, SvLBox& _rDev, BmpColorMode eMode( BMP_COLOR_NORMAL ); if ( !!m_pImpl->m_aImage1_hc ) { // we really have HC images - const Wallpaper& rDeviceBackground = _rDev.GetDisplayBackground(); - if ( rDeviceBackground.GetColor().IsDark() ) + if ( _rDev.GetSettings().GetStyleSettings().GetHighContrastMode() ) eMode = BMP_COLOR_HIGHCONTRAST; } diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index a697928842af..503325ddf802 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -1813,7 +1813,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags, const Image* pImg = 0; BmpColorMode eBitmapMode = BMP_COLOR_NORMAL; - if ( GetDisplayBackground().GetColor().IsDark() ) + if ( GetSettings().GetStyleSettings().GetHighContrastMode() ) eBitmapMode = BMP_COLOR_HIGHCONTRAST; if( IsExpanded(pEntry) ) diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 2b212fdcffeb..8312fc432299 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -369,7 +369,7 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) : // insert the categories // "New Document" - sal_Bool bHiContrast = GetBackground().GetColor().IsDark(); + sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); Image aImage( SvtResId( bHiContrast ? IMG_SVT_NEWDOC_HC : IMG_SVT_NEWDOC ) ); nMaxTextLength = aImage.GetSizePixel().Width(); String aEntryStr = String( SvtResId( STR_SVT_NEWDOC ) ); @@ -1348,7 +1348,7 @@ void SvtTemplateWindow::InitToolBoxImages() { SvtMiscOptions aMiscOpt; BOOL bLarge = aMiscOpt.AreCurrentSymbolsLarge(); - sal_Bool bHiContrast = aFileViewTB.GetBackground().GetColor().IsDark(); + sal_Bool bHiContrast = aFileViewTB.GetSettings().GetStyleSettings().GetHighContrastMode(); aFileViewTB.SetItemImage( TI_DOCTEMPLATE_BACK, Image( SvtResId( bLarge ? bHiContrast ? IMG_SVT_DOCTEMPL_HC_BACK_LARGE : IMG_SVT_DOCTEMPLATE_BACK_LARGE @@ -1372,7 +1372,7 @@ void SvtTemplateWindow::InitToolBoxImages() void SvtTemplateWindow::UpdateIcons() { - pIconWin->UpdateIcons( aFileViewTB.GetBackground().GetColor().IsDark() ); + pIconWin->UpdateIcons( aFileViewTB.GetSettings().GetStyleSettings().GetHighContrastMode() ); } // ------------------------------------------------------------------------ diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 5be239a5593e..097bba0e39f9 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -644,8 +644,7 @@ void FontNameBox::DataChanged( const DataChangedEvent& rDCEvt ) void FontNameBox::InitBitmaps( void ) { - Color aCol = GetSettings().GetStyleSettings().GetWindowColor(); - BOOL bHC = aCol.IsDark(); + BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); maImagePrinterFont = Image( SvtResId( bHC? RID_IMG_PRINTERFONT_HC : RID_IMG_PRINTERFONT ) ); maImageBitmapFont = Image( SvtResId( bHC? RID_IMG_BITMAPFONT_HC : RID_IMG_BITMAPFONT ) ); diff --git a/svtools/source/dialogs/printdlg.cxx b/svtools/source/dialogs/printdlg.cxx index 68acffc62a74..3a7171090cd2 100644 --- a/svtools/source/dialogs/printdlg.cxx +++ b/svtools/source/dialogs/printdlg.cxx @@ -172,7 +172,7 @@ PrintDialog::~PrintDialog() void PrintDialog::ImplSetImages() { - if( ! GetSettings().GetStyleSettings().GetDialogColor().IsDark() ) + if( ! GetSettings().GetStyleSettings().GetHighContrastMode() ) { maImgCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_COLLATE ) ), BMP_COLOR_NORMAL ); maImgNotCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_NOCOLLATE ) ), BMP_COLOR_NORMAL ); diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx index be7738adaf14..b3ae322aa3ba 100644 --- a/svtools/source/uno/contextmenuhelper.cxx +++ b/svtools/source/uno/contextmenuhelper.cxx @@ -611,7 +611,7 @@ ContextMenuHelper::completeMenuProperties( // menu correctly. const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); bool bShowMenuImages( rSettings.GetUseImagesInMenus() ); - bool bIsHiContrast( rSettings.GetMenuColor().IsDark() ); + bool bIsHiContrast( rSettings.GetHighContrastMode() ); if ( pMenu ) { diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index eb8a543d31f9..a8d05c49a7ae 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -646,7 +646,7 @@ sal_Bool ToolboxController::isHighContrast() const vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow ) - bHighContrast = ( ((ToolBox *)pWindow)->GetBackground().GetColor().IsDark() ); + bHighContrast = ( ((ToolBox *)pWindow)->GetSettings().GetStyleSettings().GetHighContrastMode() ); } return bHighContrast; |