From 110bd0729460da3c71d06e9cff7da3e80e061adb Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Mon, 18 May 2015 15:11:25 +0900 Subject: FloatWindow - add ApplySettings Change-Id: I72a0560b761ece8d07e5773ab5e90ca2c1af65d5 --- include/vcl/floatwin.hxx | 2 ++ vcl/source/window/floatwin.cxx | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx index 16f52cb8fed4..411e8c15ec1c 100644 --- a/include/vcl/floatwin.hxx +++ b/include/vcl/floatwin.hxx @@ -123,6 +123,8 @@ protected: SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE void ImplInitSettings(); + virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE; + public: SAL_DLLPRIVATE FloatingWindow* ImplFloatHitTest( vcl::Window* pReference, const Point& rPos, HitTest& rHitTest ); SAL_DLLPRIVATE FloatingWindow* ImplFindLastLevelFloat(); diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index f7aca45ca468..ef051fc3fc80 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -186,6 +186,19 @@ void FloatingWindow::doDeferredInit(WinBits nBits) mbIsDefferedInit = false; } +void FloatingWindow::ApplySettings(vcl::RenderContext& rRenderContext) +{ + const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); + + Color aColor; + if (Window::GetStyle() & WB_3DLOOK) + aColor = rStyleSettings.GetFaceColor(); + else + aColor = rStyleSettings.GetWindowColor(); + + ApplyControlBackground(rRenderContext, aColor); +} + FloatingWindow::~FloatingWindow() { disposeOnce(); -- cgit