summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2013-11-14 10:43:45 +0100
committerJan Holesovsky <kendy@collabora.com>2013-11-14 14:25:55 +0100
commit493c1052ed15f5c14039049be438055397aa6f2f (patch)
treea3ecc378e37778ab721cf19deab808766e84deea
parent46666a7720e18238b926531a7082dbb8bc524889 (diff)
Force SetBackground() only if the appropriate settings changed.
Otherwise, when you use SetBackground() to set a color, it will be changed to white the next time the UpdateSettings() is called whatever you do ;-) Change-Id: I508a049a327fa9be5035bdb19050d6bcb53a2bfe
-rw-r--r--vcl/source/window/window.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index be193a8a940c..24edbd1e2e4b 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -5790,9 +5790,15 @@ void Window::UpdateSettings( const AllSettings& rSettings, sal_Bool bChild )
if( !aWallpaper.IsBitmap() && !aWallpaper.IsGradient() )
{
if ( mpWindowImpl->mnStyle & WB_3DLOOK )
- SetBackground( Wallpaper( rSettings.GetStyleSettings().GetFaceColor() ) );
+ {
+ if (aOldSettings.GetStyleSettings().GetFaceColor() != rSettings.GetStyleSettings().GetFaceColor())
+ SetBackground( Wallpaper( rSettings.GetStyleSettings().GetFaceColor() ) );
+ }
else
- SetBackground( Wallpaper( rSettings.GetStyleSettings().GetWindowColor() ) );
+ {
+ if (aOldSettings.GetStyleSettings().GetWindowColor() != rSettings.GetStyleSettings().GetWindowColor())
+ SetBackground( Wallpaper( rSettings.GetStyleSettings().GetWindowColor() ) );
+ }
}
}