diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-09 16:04:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-10 22:30:23 +0100 |
commit | 5b4952ca85ffec852b2361e45f987c3c5be19dc9 (patch) | |
tree | fdd92344a962b1935cd9ca788a06b9b45594bad0 /vcl | |
parent | df336d23279053593fca33c24c96f8b589cb52e4 (diff) |
margin change should trigger relayout
Change-Id: Idfcca3c6c37244ff073b9fc2fdc40955c39d01d1
Reviewed-on: https://gerrit.libreoffice.org/51012
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/window2.cxx | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index b46fae5c3f09..af41df0d4a15 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1853,7 +1853,11 @@ sal_Int32 Window::get_border_width() const void Window::set_margin_left(sal_Int32 nWidth) { WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl.get() : mpWindowImpl.get(); - pWindowImpl->mnMarginLeft = nWidth; + if (pWindowImpl->mnMarginLeft != nWidth) + { + pWindowImpl->mnMarginLeft = nWidth; + queue_resize(); + } } sal_Int32 Window::get_margin_left() const @@ -1865,7 +1869,11 @@ sal_Int32 Window::get_margin_left() const void Window::set_margin_right(sal_Int32 nWidth) { WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl.get() : mpWindowImpl.get(); - pWindowImpl->mnMarginRight = nWidth; + if (pWindowImpl->mnMarginRight != nWidth) + { + pWindowImpl->mnMarginRight = nWidth; + queue_resize(); + } } sal_Int32 Window::get_margin_right() const @@ -1877,7 +1885,11 @@ sal_Int32 Window::get_margin_right() const void Window::set_margin_top(sal_Int32 nWidth) { WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl.get() : mpWindowImpl.get(); - pWindowImpl->mnMarginTop = nWidth; + if (pWindowImpl->mnMarginTop != nWidth) + { + pWindowImpl->mnMarginTop = nWidth; + queue_resize(); + } } sal_Int32 Window::get_margin_top() const @@ -1889,7 +1901,11 @@ sal_Int32 Window::get_margin_top() const void Window::set_margin_bottom(sal_Int32 nWidth) { WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl.get() : mpWindowImpl.get(); - pWindowImpl->mnMarginBottom = nWidth; + if (pWindowImpl->mnMarginBottom != nWidth) + { + pWindowImpl->mnMarginBottom = nWidth; + queue_resize(); + } } sal_Int32 Window::get_margin_bottom() const |