diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-02 14:34:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-02 20:23:03 +0200 |
commit | 8d84d3800065b0c2d25479b84575da6906c035fc (patch) | |
tree | ee42f1fda212a207a0281e63a3e9e197e030f0e1 /vcl | |
parent | 782f4a674c0695a31591afa5cad656a7f8ca737a (diff) |
Do layout immediately in resize
the wait for the idle is too long, keep idle for re-layout when
the container size doesnt change but the contents do
Change-Id: I6ed4806e96d10937e825192de86a3d602acf1689
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101943
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/InterimItemWindow.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/control/InterimItemWindow.cxx b/vcl/source/control/InterimItemWindow.cxx index 86650fb9e8c1..132560247c74 100644 --- a/vcl/source/control/InterimItemWindow.cxx +++ b/vcl/source/control/InterimItemWindow.cxx @@ -17,7 +17,7 @@ InterimItemWindow::InterimItemWindow(vcl::Window* pParent, const OUString& rUIXM , m_pWidget(nullptr) // inheritors are expected to call InitControlBase { m_aLayoutIdle.SetPriority(TaskPriority::RESIZE); - m_aLayoutIdle.SetInvokeHandler(LINK(this, InterimItemWindow, DoResize)); + m_aLayoutIdle.SetInvokeHandler(LINK(this, InterimItemWindow, DoLayout)); m_aLayoutIdle.SetDebugName("InterimItemWindow m_aLayoutIdle"); m_xVclContentArea = VclPtr<VclVBox>::Create(this); @@ -67,11 +67,11 @@ void InterimItemWindow::queue_resize(StateChangedType eReason) StartIdleLayout(); } -void InterimItemWindow::Resize() { StartIdleLayout(); } +void InterimItemWindow::Resize() { Layout(); } -IMPL_LINK_NOARG(InterimItemWindow, DoResize, Timer*, void) { IdleResize(); } +IMPL_LINK_NOARG(InterimItemWindow, DoLayout, Timer*, void) { Layout(); } -void InterimItemWindow::IdleResize() +void InterimItemWindow::Layout() { vcl::Window* pChild = GetWindow(GetWindowType::FirstChild); assert(pChild); |