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 5ad30a7282e5..079690ef8d13 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, VclContainer &rBox);
// Copy assignment is forbidden and not implemented.
SAL_DLLPRIVATE FloatingWindow (const FloatingWindow &);
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index 1f98a6b1d713..f98ca8f649b9 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -164,7 +164,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, VclContainer &rBox);
+ virtual void setPosSizeOnContainee(Size aSize, VclContainer &rBox);
DECL_DLLPRIVATE_LINK( ImplHandleLayoutTimerHdl, void* );
protected:
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index ec8c6a5566f7..6b35c881282a 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>
@@ -808,4 +809,15 @@ void FloatingWindow::AddPopupModeWindow( vcl::Window* pWindow )
mpFirstPopupModeWin = pWindow;
}
+void FloatingWindow::setPosSizeOnContainee(Size aSize, VclContainer &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: */