Kaydet (Commit) ea059454 authored tarafından Stephan Schäfer's avatar Stephan Schäfer

#98762# support HC bitmaps

üst 04d21f4d
......@@ -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;
}
// -----------------------------------------------------------------------
......
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment