sd/source/ui/inc/DrawViewShell.hxx | 6 ++++++ sd/source/ui/view/drviews1.cxx | 10 ++++++++++ sd/source/ui/view/drviews5.cxx | 8 +------- sd/source/ui/view/drviewsa.cxx | 3 +++ 4 files changed, 20 insertions(+), 7 deletions(-)
New commits: commit 1c481fe6522f4c7d883e77a4ac32f855b9bcb323 Author: Katarina Behrens <katarina.behr...@cib.de> Date: Thu Jun 25 09:47:37 2015 +0200 tdf#87905: Use darker background colour for master view for the area behind the slide, that is Change-Id: Ie020f43a81e5eaa257c20d0a7b6feffce1614205 Reviewed-on: https://gerrit.libreoffice.org/16466 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Philippe Jung <phil.j...@free.fr> diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index d706392..66a6e86 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -388,6 +388,9 @@ public: OUString GetSidebarContextName() const; + const Color& GetAppBackgroundColor() const { return mnAppBackgroundColor; } + void SetAppBackgroundColor( Color nNewColor ) { mnAppBackgroundColor = nNewColor; } + //move this method to ViewShell. //void NotifyAccUpdate(); protected: @@ -519,6 +522,9 @@ private: ::std::unique_ptr< ViewOverlayManager > mpViewOverlayManager; std::vector<std::unique_ptr<SdrExternalToolEdit>> m_ExternalEdits; + + // The colour of the area behind the slide (used to be called "Wiese") + Color mnAppBackgroundColor; }; } // end of namespace sd diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 109d82c..8b605b0 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -316,6 +316,7 @@ bool DrawViewShell::PrepareClose( bool bUI ) return true; } + /** * Set status (enabled/disabled) of menu SfxSlots */ @@ -377,6 +378,9 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) GetViewShellBase().GetToolBarManager()->ResetToolBars(ToolBarManager::TBG_COMMON_TASK); } + svtools::ColorConfig aColorConfig; + Color aFillColor = Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor ); + if (meEditMode == EM_PAGE) { /****************************************************************** @@ -402,6 +406,8 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) maTabControl->SetCurPageId(nActualPageNum + 1); + SetAppBackgroundColor( aFillColor ); + SwitchPage(nActualPageNum); } else @@ -438,6 +444,9 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) } } + aFillColor.DecreaseLuminance( 64 ); + SetAppBackgroundColor( aFillColor ); + maTabControl->SetCurPageId(nActualMasterPageNum + 1); SwitchPage(nActualMasterPageNum); } @@ -477,6 +486,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) Invalidate( SID_TITLE_MASTERPAGE ); Invalidate( SID_NOTES_MASTERPAGE ); Invalidate( SID_HANDOUT_MASTERPAGE ); + InvalidateWindows(); SetContextName(GetSidebarContextName()); } diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 1c34b17..f0f9719 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -406,19 +406,13 @@ void DrawViewShell::PrePaint() */ void DrawViewShell::Paint(const Rectangle& rRect, ::sd::Window* pWin) { - // Fill var FillColor here to have it available on later call - svtools::ColorConfig aColorConfig; - Color aFillColor; - - aFillColor = Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor ); - /* This is done before each text edit, so why not do it before every paint. The default language is only used if the outliner only contains one character in a symbol font */ GetDoc()->GetDrawOutliner( NULL ).SetDefaultLanguage( GetDoc()->GetLanguage( EE_CHAR_LANGUAGE ) ); // Set Application Background color for usage in SdrPaintView(s) - mpDrawView->SetApplicationBackgroundColor(aFillColor); + mpDrawView->SetApplicationBackgroundColor(GetAppBackgroundColor()); /* This is done before each text edit, so why not do it before every paint. The default language is only used if the outliner only contains one diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 6385349..a1b332e 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -209,6 +209,9 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind) mbPastePossible = false; mbIsLayerModeActive = false; + svtools::ColorConfig aColorConfig; + mnAppBackgroundColor = Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor ); + mpFrameView->Connect(); OSL_ASSERT (GetViewShell()!=NULL); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits