From 71968455be0e696423011775b957d5b738b9f457 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 3 Sep 2021 17:27:54 +0100 Subject: tdf#142458 Set correct ScrolledWindow BorderWidth in the ctor and keep it updated when the relevant properties that affect it change. This avoids the problem that the borderwidth can change during "Paint" (which is something we strongly want to avoid). a problem since: commit f39f21d92ec83c3a5062f29dd26214fc83012c06 Date: Thu Nov 19 11:51:13 2020 +0100 tdf#138010 (IV) VclScrolledWindow: Use actual border width and then remove the potential change of BorderWidth during paint Change-Id: I2ec317d86687fdb75e6323905f6d1c3b8fc655e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121557 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos --- include/vcl/layout.hxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index ec4722b48849..064904b14812 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -500,8 +500,7 @@ public: private: virtual Size calculateRequisition() const override; virtual void setAllocation(const Size &rAllocation) override; - // sets new border size and adapts scrollbar and child widget position/size as needed - void updateBorderWidth(tools::Long nBorderWidth); + int CalcBorderWidth() const; DECL_LINK(ScrollBarHdl, ScrollBar*, void); void InitScrollBars(const Size &rRequest); virtual bool EventNotify(NotifyEvent& rNEvt) override; -- cgit