Resolves tdf#142115 - Make color of NotesPane customizable
* Color follows not Writer's section color and General's
object boundary color for the separator line
* Section color adjusted to Gray 1 for Dark scheme
Change-Id: I5748c1ac3c0a4997edfffac786e3d247641fc637
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121122
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI.xcu b/officecfg/registry/data/org/openoffice/Office/UI.xcu
index efef517..4e0e4c0 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI.xcu
@@ -535,7 +535,7 @@
<value>true</value>
</prop>
<prop oor:name="Color">
<value>1842204</value>
<value>6710886</value>
</prop>
</node>
<node oor:name="WriterHeaderFooterMark">
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index de9a006..0ac6f55 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -118,10 +118,6 @@
#include <svtools/optionsdrawinglayer.hxx>
#include <vcl/GraphicLoader.hxx>
#define COL_NOTES_SIDEPANE Color(230,230,230)
#define COL_NOTES_SIDEPANE_BORDER Color(200,200,200)
#define COL_NOTES_SIDEPANE_SCROLLAREA Color(230,230,220)
using namespace ::editeng;
using namespace ::com::sun::star;
@@ -6079,23 +6075,23 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
_pViewShell->GetOut()->SetLineColor();
if (!bRight)
{
_pViewShell->GetOut()->SetFillColor(COL_NOTES_SIDEPANE_BORDER);
_pViewShell->GetOut()->SetFillColor(SwViewOption::GetObjectBoundariesColor());
_pViewShell->GetOut()->DrawRect(tools::Rectangle(Point(aPageRect.Left()-pMgr->GetSidebarBorderWidth(),aPageRect.Top()),Size(pMgr->GetSidebarBorderWidth(),aPageRect.Height()))) ;
if (Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
_pViewShell->GetOut()->SetFillColor(COL_BLACK);
else
_pViewShell->GetOut()->SetFillColor(COL_NOTES_SIDEPANE);
_pViewShell->GetOut()->SetFillColor(SwViewOption::GetSectionBoundColor());
_pViewShell->GetOut()->DrawRect(tools::Rectangle(Point(aPageRect.Left()-pMgr->GetSidebarWidth()-pMgr->GetSidebarBorderWidth(),aPageRect.Top()),Size(pMgr->GetSidebarWidth(),aPageRect.Height()))) ;
}
else
{
_pViewShell->GetOut()->SetFillColor(COL_NOTES_SIDEPANE_BORDER);
_pViewShell->GetOut()->SetFillColor(SwViewOption::GetObjectBoundariesColor());
SwRect aSidebarBorder(aPageRect.TopRight(),Size(pMgr->GetSidebarBorderWidth(),aPageRect.Height()));
_pViewShell->GetOut()->DrawRect(aSidebarBorder.SVRect());
if (Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
_pViewShell->GetOut()->SetFillColor(COL_BLACK);
else
_pViewShell->GetOut()->SetFillColor(COL_NOTES_SIDEPANE);
_pViewShell->GetOut()->SetFillColor(SwViewOption::GetSectionBoundColor());
SwRect aSidebar(Point(aPageRect.Right()+pMgr->GetSidebarBorderWidth(),aPageRect.Top()),Size(pMgr->GetSidebarWidth(),aPageRect.Height()));
_pViewShell->GetOut()->DrawRect(aSidebar.SVRect());
}
@@ -6124,7 +6120,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
else
{
_pViewShell->GetOut()->SetLineColor(COL_BLACK);
_pViewShell->GetOut()->SetFillColor(COL_NOTES_SIDEPANE_SCROLLAREA);
_pViewShell->GetOut()->SetFillColor(COL_LIGHTGRAY);
}
_pViewShell->GetOut()->DrawRect(aRectBottom);
_pViewShell->GetOut()->DrawLine(aPointBottom + Point(pMgr->GetSidebarWidth()/3,0), aPointBottom + Point(pMgr->GetSidebarWidth()/3 , _pViewShell->GetOut()->PixelToLogic(Size(0,nScrollerHeight)).Height()));
@@ -6145,7 +6141,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
else
{
_pViewShell->GetOut()->SetLineColor(COL_BLACK);
_pViewShell->GetOut()->SetFillColor(COL_NOTES_SIDEPANE_SCROLLAREA);
_pViewShell->GetOut()->SetFillColor(COL_LIGHTGRAY);
}
_pViewShell->GetOut()->DrawRect(aRectTop);
_pViewShell->GetOut()->DrawLine(aPointTop + Point(pMgr->GetSidebarWidth()/3*2,0), aPointTop + Point(pMgr->GetSidebarWidth()/3*2 , _pViewShell->GetOut()->PixelToLogic(Size(0,nScrollerHeight)).Height()));