Kaydet (Commit) 9dc6c3c4 authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Miklos Vajna

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/16466Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarPhilippe Jung <phil.jung@free.fr>
(cherry picked from commit 1c481fe6)
üst 5a3f165b
...@@ -376,6 +376,9 @@ public: ...@@ -376,6 +376,9 @@ public:
OUString GetSidebarContextName() const; OUString GetSidebarContextName() const;
const Color& GetAppBackgroundColor() const { return mnAppBackgroundColor; }
void SetAppBackgroundColor( Color nNewColor ) { mnAppBackgroundColor = nNewColor; }
//move this method to ViewShell. //move this method to ViewShell.
//void NotifyAccUpdate(); //void NotifyAccUpdate();
protected: protected:
...@@ -507,6 +510,9 @@ private: ...@@ -507,6 +510,9 @@ private:
::std::unique_ptr< ViewOverlayManager > mpViewOverlayManager; ::std::unique_ptr< ViewOverlayManager > mpViewOverlayManager;
std::vector<std::unique_ptr<SdrExternalToolEdit>> m_ExternalEdits; 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 } // end of namespace sd
......
...@@ -316,6 +316,7 @@ bool DrawViewShell::PrepareClose( bool bUI ) ...@@ -316,6 +316,7 @@ bool DrawViewShell::PrepareClose( bool bUI )
return true; return true;
} }
/** /**
* Set status (enabled/disabled) of menu SfxSlots * Set status (enabled/disabled) of menu SfxSlots
*/ */
...@@ -378,6 +379,9 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) ...@@ -378,6 +379,9 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
GetViewShellBase().GetToolBarManager()->ResetToolBars(ToolBarManager::TBG_COMMON_TASK); GetViewShellBase().GetToolBarManager()->ResetToolBars(ToolBarManager::TBG_COMMON_TASK);
} }
svtools::ColorConfig aColorConfig;
Color aFillColor = Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor );
if (meEditMode == EM_PAGE) if (meEditMode == EM_PAGE)
{ {
/****************************************************************** /******************************************************************
...@@ -403,6 +407,8 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) ...@@ -403,6 +407,8 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
maTabControl->SetCurPageId(nActualPageNum + 1); maTabControl->SetCurPageId(nActualPageNum + 1);
SetAppBackgroundColor( aFillColor );
SwitchPage(nActualPageNum); SwitchPage(nActualPageNum);
} }
else else
...@@ -439,6 +445,9 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) ...@@ -439,6 +445,9 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
} }
} }
aFillColor.DecreaseLuminance( 64 );
SetAppBackgroundColor( aFillColor );
maTabControl->SetCurPageId(nActualMasterPageNum + 1); maTabControl->SetCurPageId(nActualMasterPageNum + 1);
SwitchPage(nActualMasterPageNum); SwitchPage(nActualMasterPageNum);
} }
...@@ -478,6 +487,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) ...@@ -478,6 +487,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
Invalidate( SID_TITLE_MASTERPAGE ); Invalidate( SID_TITLE_MASTERPAGE );
Invalidate( SID_NOTES_MASTERPAGE ); Invalidate( SID_NOTES_MASTERPAGE );
Invalidate( SID_HANDOUT_MASTERPAGE ); Invalidate( SID_HANDOUT_MASTERPAGE );
InvalidateWindows();
SetContextName(GetSidebarContextName()); SetContextName(GetSidebarContextName());
} }
......
...@@ -406,19 +406,13 @@ void DrawViewShell::PrePaint() ...@@ -406,19 +406,13 @@ void DrawViewShell::PrePaint()
*/ */
void DrawViewShell::Paint(const Rectangle& rRect, ::sd::Window* pWin) 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. /* 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 The default language is only used if the outliner only contains one
character in a symbol font */ character in a symbol font */
GetDoc()->GetDrawOutliner( NULL ).SetDefaultLanguage( GetDoc()->GetLanguage( EE_CHAR_LANGUAGE ) ); GetDoc()->GetDrawOutliner( NULL ).SetDefaultLanguage( GetDoc()->GetLanguage( EE_CHAR_LANGUAGE ) );
// Set Application Background color for usage in SdrPaintView(s) // 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. /* 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 The default language is only used if the outliner only contains one
......
...@@ -208,6 +208,9 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind) ...@@ -208,6 +208,9 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
mbPastePossible = false; mbPastePossible = false;
mbIsLayerModeActive = false; mbIsLayerModeActive = false;
svtools::ColorConfig aColorConfig;
mnAppBackgroundColor = Color( aColorConfig.GetColorValue( svtools::APPBACKGROUND ).nColor );
mpFrameView->Connect(); mpFrameView->Connect();
OSL_ASSERT (GetViewShell()!=NULL); OSL_ASSERT (GetViewShell()!=NULL);
......
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