[Libreoffice-commits] core.git: include/vcl vcl/source
Caolán McNamara
caolanm at redhat.com
Thu Apr 9 03:10:08 PDT 2015
include/vcl/floatwin.hxx | 1 +
include/vcl/syswin.hxx | 2 +-
vcl/source/window/floatwin.cxx | 12 ++++++++++++
vcl/source/window/syswin.cxx | 4 ++--
4 files changed, 16 insertions(+), 3 deletions(-)
New commits:
commit 95942b16f44bc6eac57ad7b579b4158565446884
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 9 11:08:13 2015 +0100
Resolves: tdf#90481 fix cropped buttons
this reverts
commit f0ee8ed43528b17e9ea6d83388fbaab0a645b677
Author: Caolán McNamara <caolanm at redhat.com>
see if we can merge floating window and dialog child size/pos setting
seeing as we apparently can't merge them the way that tried to do
Change-Id: I25fb741c9ae73375124b469f98bf1eecd76ff3c1
diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index 60bc992..b000fb7 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -93,6 +93,7 @@ private:
SAL_DLLPRIVATE void ImplCallPopupModeEnd();
DECL_DLLPRIVATE_LINK( ImplEndPopupModeHdl, void* );
+ virtual void setPosSizeOnContainee(Size aSize, Window &rBox) SAL_OVERRIDE;
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 7694eae4..c313e2f 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 1373485..8ad024e 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: */
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 01c7ed5..1455c3b 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -1035,8 +1035,8 @@ void SystemWindow::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;
+ aSize.Width() -= 2 * nBorderWidth;
+ aSize.Height() -= 2 * nBorderWidth;
Point aPos(nBorderWidth, nBorderWidth);
VclContainer::setLayoutAllocation(rBox, aPos, aSize);
More information about the Libreoffice-commits
mailing list