summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-10-12 08:39:23 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-10-31 12:03:28 +0100
commit2cc05f7b85a37be41614793ffd56755c39eb96de (patch)
tree1b2870972b0f7eb74aa6860136962f09a5871c66 /sfx2
parentf7b6ff632718c448f8e74d17fdbf2e03297930dc (diff)
InfoBars: Hight Contrast painting
Change-Id: I3ba70be099bc4364d8f6d2d0700add83353f2900
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/infobar.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index cbcbf7f8bb3e..1f979e871514 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -18,6 +18,7 @@
#include <sfx2/objsh.hxx>
#include <sfx2/sfx.hrc>
#include <sfx2/viewsh.hxx>
+#include <vcl/svapp.hxx>
using namespace std;
@@ -49,6 +50,14 @@ namespace
basegfx::BColor aLightColor( 1.0, 1.0, 191.0 / 255.0 );
basegfx::BColor aDarkColor( 217.0 / 255.0, 217.0 / 255.0, 78.0 / 255.0 );
+ const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
+ if ( rSettings.GetHighContrastMode() )
+ {
+ aLightColor = rSettings.GetLightColor( ).getBColor( );
+ aDarkColor = rSettings.GetDialogTextColor( ).getBColor( );
+
+ }
+
// Light background
basegfx::B2DPolygon aPolygon;
aPolygon.append( basegfx::B2DPoint( aRect.Left( ), aRect.Top( ) ) );
@@ -149,6 +158,16 @@ void SfxInfoBarWindow::Paint( const Rectangle& rPaintRect )
basegfx::BColor aLightColor( 1.0, 1.0, 191.0 / 255.0 );
basegfx::BColor aDarkColor( 217.0 / 255.0, 217.0 / 255.0, 78.0 / 255.0 );
+ const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
+ if ( rSettings.GetHighContrastMode() )
+ {
+ aLightColor = rSettings.GetLightColor( ).getBColor( );
+ aDarkColor = rSettings.GetDialogTextColor( ).getBColor( );
+ }
+
+ // Update the label background color
+ m_pMessage->SetBackground( Wallpaper( Color( aLightColor ) ) );
+
// Light background
basegfx::B2DPolygon aPolygon;
aPolygon.append( basegfx::B2DPoint( aRect.Left( ), aRect.Top( ) ) );