vcl/source/window/layout.cxx | 4 ++++ 1 file changed, 4 insertions(+) New commits: commit bd4f890462701f9ab39f78429704d13c971fc776 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Sep 15 11:52:23 2021 +0100 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Thu Sep 30 11:07:04 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 <caol...@redhat.com> (cherry picked from commit dedb3337291c09c85262ca08bacd01e8e5901d22) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122741 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> 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);