diff options
author | Oliver Bolte <obo@openoffice.org> | 2003-09-04 06:42:10 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2003-09-04 06:42:10 +0000 |
commit | 0b76e106b8054c91a7b7d793d9219f6ee9ae7d2c (patch) | |
tree | 5dfcef730d01e352a92f6232e3fba7392d0516c5 | |
parent | 0512fa80551c0cac85a3e19b76644532bd5346f1 (diff) |
INTEGRATION: CWS mt801 (1.21.132); FILE MERGED
2003/08/29 14:35:52 mt 1.21.132.1: #80064# Print button with color...
-rw-r--r-- | vcl/source/control/button.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index bfa0fa20ac93..f9697e38bd94 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -2,9 +2,9 @@ * * $RCSfile: button.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: vg $ $Date: 2003-04-17 17:55:28 $ + * last change: $Author: obo $ $Date: 2003-09-04 07:42:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1080,9 +1080,23 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, pDev->SetMapMode(); pDev->SetFont( aFont ); if ( nFlags & WINDOW_DRAW_MONO ) + { pDev->SetTextColor( Color( COL_BLACK ) ); + } else + { pDev->SetTextColor( GetTextColor() ); + + // DecoView uses the FaceColor... + AllSettings aSettings = pDev->GetSettings(); + StyleSettings aStyleSettings = aSettings.GetStyleSettings(); + if ( IsControlBackground() ) + aStyleSettings.SetFaceColor( GetControlBackground() ); + else + aStyleSettings.SetFaceColor( GetSettings().GetStyleSettings().GetFaceColor() ); + aSettings.SetStyleSettings( aStyleSettings ); + pDev->SetSettings( aSettings ); + } pDev->SetTextFillColor(); DecorationView aDecoView( pDev ); |