diff options
author | Stephan Schäfer <ssa@openoffice.org> | 2002-08-14 13:05:52 +0000 |
---|---|---|
committer | Stephan Schäfer <ssa@openoffice.org> | 2002-08-14 13:05:52 +0000 |
commit | 4ad4a9dc9f9778cd44c552bec76f96c13366f341 (patch) | |
tree | 76545f8054c676bc57bf5f4cfe26251288016f57 /vcl/source/window/split.cxx | |
parent | 6baf197b9641a9107692f35ac03495d1681fa8fc (diff) |
#101949# improve high contrast handling
Diffstat (limited to 'vcl/source/window/split.cxx')
-rw-r--r-- | vcl/source/window/split.cxx | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index d748e7df37c5..df5529015a4c 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -2,9 +2,9 @@ * * $RCSfile: split.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: ssa $ $Date: 2002-07-19 15:24:32 $ + * last change: $Author: ssa $ $Date: 2002-08-14 14:05:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -138,6 +138,7 @@ void Splitter::ImplInit( Window* pParent, WinBits nWinStyle ) } SetPointer( Pointer( ePointerStyle ) ); + if( GetSettings().GetStyleSettings().GetFaceColor().IsDark() ) SetBackground( ImplWhiteWall ); else @@ -764,6 +765,25 @@ long Splitter::Notify( NotifyEvent& rNEvt ) // ----------------------------------------------------------------------- +void Splitter::DataChanged( const DataChangedEvent& rDCEvt ) +{ + Window::DataChanged( rDCEvt ); + if( rDCEvt.GetType() == DATACHANGED_SETTINGS ) + { + Color oldFaceColor = ((AllSettings *) rDCEvt.GetData())->GetStyleSettings().GetFaceColor(); + Color newFaceColor = Application::GetSettings().GetStyleSettings().GetFaceColor(); + if( oldFaceColor.IsDark() != newFaceColor.IsDark() ) + { + if( newFaceColor.IsDark() ) + SetBackground( ImplWhiteWall ); + else + SetBackground( ImplBlackWall ); + } + } +} + +// ----------------------------------------------------------------------- + void Splitter::Paint( const Rectangle& rPaintRect ) { if( HasFocus() || mbKbdSplitting ) @@ -805,10 +825,6 @@ void Splitter::Paint( const Rectangle& rPaintRect ) } else { - if( GetSettings().GetStyleSettings().GetFaceColor().IsDark() ) - SetBackground( ImplWhiteWall ); - else - SetBackground( ImplBlackWall ); Window::Paint( rPaintRect ); } } |