diff options
author | Stephan Schäfer <ssa@openoffice.org> | 2002-04-18 07:04:36 +0000 |
---|---|---|
committer | Stephan Schäfer <ssa@openoffice.org> | 2002-04-18 07:04:36 +0000 |
commit | ea059454e3f26a97ae87b54735295e8d5e64c086 (patch) | |
tree | 01aa4aba593baf5094f756c129b55392925da524 /vcl | |
parent | 04d21f4d019f4309b2ecccfd82df884db1819e84 (diff) |
#98762# support HC bitmaps
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/msgbox.cxx | 24 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 36 |
2 files changed, 54 insertions, 6 deletions
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 5517f7a7c73b..efecd0512e8d 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: msgbox.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: ssa $ $Date: 2002-03-22 17:39:40 $ + * last change: $Author: ssa $ $Date: 2002-04-18 08:04:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -340,6 +340,9 @@ void MessBox::ImplPosControls() IMPL_DIALOG_OFFSET-2+IMPL_MSGBOX_OFFSET_EXTRA_Y ), aImageSize ); mpFixedImage->SetImage( maImage ); + // forward the HC image + if( !!maImageHC ) + mpFixedImage->SetModeImage( maImageHC, BMP_COLOR_HIGHCONTRAST ); mpFixedImage->Show(); nMaxWidth -= aImageSize.Width()+IMPL_SEP_MSGBOX_IMAGE; } @@ -468,14 +471,27 @@ void MessBox::SetDefaultCheckBoxText() maCheckBoxText = rText; } +// ----------------------------------------------------------------------- + BOOL MessBox::SetModeImage( const Image& rImage, BmpColorMode eMode ) { - return FALSE; + if( eMode == BMP_COLOR_NORMAL ) + SetImage( rImage ); + else if( eMode == BMP_COLOR_HIGHCONTRAST ) + maImageHC = rImage; + else + return FALSE; + return TRUE; } +// ----------------------------------------------------------------------- + const Image& MessBox::GetModeImage( BmpColorMode eMode ) const { - return maImage; + if( eMode == BMP_COLOR_HIGHCONTRAST ) + return maImageHC; + else + return maImage; } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 5182e78fdfda..0901f5c358a3 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -2,9 +2,9 @@ * * $RCSfile: window.cxx,v $ * - * $Revision: 1.75 $ + * $Revision: 1.76 $ * - * last change: $Author: hr $ $Date: 2002-04-16 11:31:03 $ + * last change: $Author: ssa $ $Date: 2002-04-18 08:04:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -7517,3 +7517,35 @@ String Window::GetAccessibleDescription() const return aAccessibleDescription; } + + +// returns background color used in this control +// false: could not determine color +BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol ) +{ + BOOL bRet = TRUE; + + switch ( GetType() ) + { + // peform special handling here + case WINDOW_PUSHBUTTON: + case WINDOW_OKBUTTON: + case WINDOW_CANCELBUTTON: + // etc. + default: + if( IsControlBackground() ) + rCol = GetControlBackground(); + else if( IsBackground() ) + { + Wallpaper aWall = GetBackground(); + if( !aWall.IsGradient() && !aWall.IsBitmap() ) + rCol = aWall.GetColor(); + else + bRet = FALSE; + } + else + rCol = GetSettings().GetStyleSettings().GetFaceColor(); + break; + } + return bRet; +} |