[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 15 12:53:54 UTC 2021


 vcl/source/window/layout.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit dedb3337291c09c85262ca08bacd01e8e5901d22
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Sep 15 11:52:23 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Sep 15 14:53:20 2021 +0200

    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 at redhat.com>

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index d9f479ee39e6..4c38928b37f0 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1832,6 +1832,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
@@ -2103,6 +2105,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);


More information about the Libreoffice-commits mailing list