include/vcl/layout.hxx | 1 + vcl/source/window/builder.cxx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit f70bd1aeee9360e29d42ff66acfce07d84047b25 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Jul 8 14:05:01 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Jul 8 18:16:46 2020 +0200 drop WB_BORDER if the border style is invisible Change-Id: Ie88818cb2b61d411f868f748d6a7c2fdf8028e65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98377 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index ff33f1a107f8..facf8854263b 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -511,6 +511,7 @@ public: virtual const vcl::Window *get_child() const override; virtual bool set_property(const OString &rKey, const OUString &rValue) override; virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; + bool HasVisibleBorder() const { return m_eDrawFrameStyle != DrawFrameStyle::NONE; } ScrollBar& getVertScrollBar() { return *m_pVScroll; } ScrollBar& getHorzScrollBar() { return *m_pHScroll; } Size getVisibleChildSize() const; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 1c93d0016df8..259cc45fb432 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1579,7 +1579,9 @@ vcl::Window* VclBuilder::prepareWidgetOwnScrolling(vcl::Window *pParent, WinBits { WinBits nScrollBits = pParent->GetStyle(); nScrollBits &= (WB_AUTOHSCROLL|WB_HSCROLL|WB_AUTOVSCROLL|WB_VSCROLL); - rWinStyle |= nScrollBits | WB_BORDER; + rWinStyle |= nScrollBits; + if (static_cast<VclScrolledWindow*>(pParent)->HasVisibleBorder()) + rWinStyle |= WB_BORDER; pParent = pParent->GetParent(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits