diff options
author | László Németh <nemeth@numbertext.org> | 2021-03-17 17:31:31 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-03-28 11:38:56 +0200 |
commit | b7044d6cdbf612a312f64d39b7daaf6ed72726a5 (patch) | |
tree | a12ec01caa6e6b722a57b103bbe3bc0eff45a7a1 /sw/source/uibase/docvw/SidebarTxtControl.cxx | |
parent | c7483d48df1b9ae70335346846d02a4fc53b4558 (diff) |
sw change tracking: antialias deleted comments
Deleted comments get cross out lines with
change tracking, now with (optional) antialiasing
(as in the case of connecting lines of the comments).
Also adjust bottom line ends (which were
removed by the bottom text label of the
comment box, resulting a gap between the
bottom line end and the left/right frame
borders of the comment box).
Change-Id: I73f944ad9b82562d62029617cb029ca396b74ab9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112650
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source/uibase/docvw/SidebarTxtControl.cxx')
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 2f0fe44a21e9..17b4346f1247 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -29,6 +29,7 @@ #include <strings.hrc> #include <unotools/securityoptions.hxx> +#include <officecfg/Office/Common.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/bindings.hxx> @@ -250,14 +251,20 @@ void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const tools:: if (mrSidebarWin.GetLayoutStatus() == SwPostItHelper::DELETED) { + const AntialiasingFlags nFormerAntialiasing( rRenderContext.GetAntialiasing() ); + const bool bIsAntiAliasing = officecfg::Office::Common::Drawinglayer::AntiAliasing::get(); + if ( bIsAntiAliasing ) + rRenderContext.SetAntialiasing(AntialiasingFlags::Enable); rRenderContext.SetLineColor(mrSidebarWin.GetChangeColor()); rRenderContext.DrawLine(rRenderContext.PixelToLogic(aPos), rRenderContext.PixelToLogic(aPos + Point(aSize.Width(), - aSize.Height()))); + aSize.Height() * 0.95))); rRenderContext.DrawLine(rRenderContext.PixelToLogic(aPos + Point(aSize.Width(), 0)), rRenderContext.PixelToLogic(aPos + Point(0, - aSize.Height()))); + aSize.Height() * 0.95))); + if ( bIsAntiAliasing ) + rRenderContext.SetAntialiasing(nFormerAntialiasing); } } |