Kaydet (Commit) 2cc05f7b authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

InfoBars: Hight Contrast painting

Change-Id: I3ba70be099bc4364d8f6d2d0700add83353f2900
üst f7b6ff63
......@@ -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( ) ) );
......
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