summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-15 11:52:23 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-09-30 11:07:04 +0200
commitbd4f890462701f9ab39f78429704d13c971fc776 (patch)
tree9bd3092b1d101f05f616e156b293b0f85767ae01 /vcl
parent3f9f935eed6f6110525aab48c72c3ba910691f32 (diff)
Resolves: tdf#143487 don't draw a border at all for DrawFrameStyle::NONE
Change-Id: I7794376c9475a32276d23135365c99a3f6fb7d84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122142 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit dedb3337291c09c85262ca08bacd01e8e5901d22) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122741 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/layout.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index ae147dd093e5..be5b0d1ab39f 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1831,6 +1831,8 @@ VclScrolledWindow::VclScrolledWindow(vcl::Window *pParent)
int VclScrolledWindow::CalcBorderWidth() const
{
+ if (m_eDrawFrameStyle == DrawFrameStyle::NONE)
+ return 0;
const tools::Rectangle aRect(tools::Rectangle(Point(0, 0), Size(100, 100)));
DecorationView aDecoView(const_cast<OutputDevice*>(GetOutDev()));
// don't actually draw anything, just measure what size it would be and the diff is the desired border size to reserve
@@ -2102,6 +2104,8 @@ bool VclScrolledWindow::EventNotify(NotifyEvent& rNEvt)
void VclScrolledWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
VclBin::Paint(rRenderContext, rRect);
+ if (m_eDrawFrameStyle == DrawFrameStyle::NONE)
+ return;
const tools::Rectangle aRect(tools::Rectangle(Point(0,0), GetSizePixel()));
DecorationView aDecoView(&rRenderContext);
const tools::Rectangle aContentRect = aDecoView.DrawFrame(aRect, m_eDrawFrameStyle, m_eDrawFrameFlags);