summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/floatwin.hxx1
-rw-r--r--include/vcl/syswin.hxx2
-rw-r--r--vcl/source/window/floatwin.cxx12
3 files changed, 14 insertions, 1 deletions
diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index d017b218901e..c9e03b4a5c2f 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -94,6 +94,7 @@ private:
SAL_DLLPRIVATE void ImplCallPopupModeEnd();
DECL_DLLPRIVATE_LINK( ImplEndPopupModeHdl, void* );
+ virtual void setPosSizeOnContainee(Size aSize, Window &rBox);
FloatingWindow (const FloatingWindow &) SAL_DELETED_FUNCTION;
FloatingWindow & operator= (const FloatingWindow &) SAL_DELETED_FUNCTION;
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index 1f29d45f0613..2773fa66ff7e 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -158,7 +158,7 @@ public:
private:
SAL_DLLPRIVATE void Init();
SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window* i_pConfigureWin );
- SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, Window &rBox);
+ virtual void setPosSizeOnContainee(Size aSize, Window &rBox);
DECL_DLLPRIVATE_LINK( ImplHandleLayoutTimerHdl, void* );
protected:
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index f7089c162dda..e22ec5dc7a94 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -22,6 +22,7 @@
#include <window.h>
#include <salframe.hxx>
+#include <vcl/layout.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/event.hxx>
@@ -807,4 +808,15 @@ 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: */