summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-09 11:08:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-09 11:09:39 +0100
commit95942b16f44bc6eac57ad7b579b4158565446884 (patch)
tree799da704fbbdcae6f72c458aa588a23cb31b81e9 /vcl
parent04443db44edfa389eddef5667053f2fa5d7d5978 (diff)
Resolves: tdf#90481 fix cropped buttons
this reverts commit f0ee8ed43528b17e9ea6d83388fbaab0a645b677 Author: Caolán McNamara <caolanm@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
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/floatwin.cxx12
-rw-r--r--vcl/source/window/syswin.cxx4
2 files changed, 14 insertions, 2 deletions
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 13734851ab9b..8ad024e1511f 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 01c7ed5dfc7f..1455c3b93e2a 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);