diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-10 23:36:22 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-11 00:07:12 +0300 |
commit | 9079d599baf01cb414ed4cccb22546f1807e5637 (patch) | |
tree | 62e96b76ed74044c5c26253e44870fedc1658358 | |
parent | The key event is not needed for the non-ToolBox case (diff) | |
download | core-9079d599baf01cb414ed4cccb22546f1807e5637.tar.gz core-9079d599baf01cb414ed4cccb22546f1807e5637.zip |
Merge SystemWindow and FloatingWindow setPosSizeOnContainee methods
This reverts commit 95942b16f44bc6eac57ad7b579b4158565446884
("Resolves: tdf#90481 fix cropped buttons"), and changes the
code in a way that seems to not crop buttons anymore. Tested
under gtk3 with File > Digital Signatures... and the toolbar
underline dropdown.
Change-Id: Idcb680c82f594f630b1dd7c76c42912e6b5a093a
-rw-r--r-- | include/vcl/floatwin.hxx | 1 | ||||
-rw-r--r-- | include/vcl/syswin.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 11 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 2 |
4 files changed, 2 insertions, 14 deletions
diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx index 414fcee0aac2..680cc13131af 100644 --- a/include/vcl/floatwin.hxx +++ b/include/vcl/floatwin.hxx @@ -103,7 +103,6 @@ private: SAL_DLLPRIVATE void ImplCallPopupModeEnd(); DECL_DLLPRIVATE_LINK( ImplEndPopupModeHdl, void*, void ); - virtual void setPosSizeOnContainee(Size aSize, Window &rBox) override; FloatingWindow (const FloatingWindow &) = delete; FloatingWindow & operator= (const FloatingWindow &) = delete; diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index d3a44e78f63d..dd6d9f0651e3 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -177,7 +177,7 @@ public: private: SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window* i_pConfigureWin ); - virtual void setPosSizeOnContainee(Size aSize, Window &rBox); + SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, Window &rBox); DECL_DLLPRIVATE_LINK( ImplHandleLayoutTimerHdl, Idle*, void ); protected: diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index f9c4513d32a8..465177eb3499 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -827,15 +827,4 @@ void FloatingWindow::AddPopupModeWindow( vcl::Window* pWindow ) mpFirstPopupModeWin = pWindow; } -void FloatingWindow::setPosSizeOnContainee(Size aSize, Window &rBox) -{ - sal_Int32 nBorderWidth = get_border_width(); - - aSize.Width() -= mpWindowImpl->mnLeftBorder + mpWindowImpl->mnRightBorder + 2 * nBorderWidth; - aSize.Height() -= nBorderWidth + mpWindowImpl->mnTopBorder + mpWindowImpl->mnBottomBorder + 2 * nBorderWidth; - - Point aPos(nBorderWidth, nBorderWidth); - VclContainer::setLayoutAllocation(rBox, aPos, aSize); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index dca00fd98f27..f844eef16d1a 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1107,7 +1107,7 @@ void SystemWindow::setPosSizeOnContainee(Size aSize, Window &rBox) aSize.Height() -= 2 * nBorderWidth; Point aPos(nBorderWidth, nBorderWidth); - VclContainer::setLayoutAllocation(rBox, aPos, aSize); + VclContainer::setLayoutAllocation(rBox, aPos, CalcOutputSize(aSize)); } IMPL_LINK_NOARG( SystemWindow, ImplHandleLayoutTimerHdl, Idle*, void ) |