Kaydet (Commit) 95942b16 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#90481 fix cropped buttons

this reverts

    commit f0ee8ed4
    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
üst 04443db4
...@@ -93,6 +93,7 @@ private: ...@@ -93,6 +93,7 @@ private:
SAL_DLLPRIVATE void ImplCallPopupModeEnd(); SAL_DLLPRIVATE void ImplCallPopupModeEnd();
DECL_DLLPRIVATE_LINK( ImplEndPopupModeHdl, void* ); DECL_DLLPRIVATE_LINK( ImplEndPopupModeHdl, void* );
virtual void setPosSizeOnContainee(Size aSize, Window &rBox) SAL_OVERRIDE;
FloatingWindow (const FloatingWindow &) SAL_DELETED_FUNCTION; FloatingWindow (const FloatingWindow &) SAL_DELETED_FUNCTION;
FloatingWindow & operator= (const FloatingWindow &) SAL_DELETED_FUNCTION; FloatingWindow & operator= (const FloatingWindow &) SAL_DELETED_FUNCTION;
......
...@@ -158,7 +158,7 @@ public: ...@@ -158,7 +158,7 @@ public:
private: private:
SAL_DLLPRIVATE void Init(); 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 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* ); DECL_DLLPRIVATE_LINK( ImplHandleLayoutTimerHdl, void* );
protected: protected:
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <window.h> #include <window.h>
#include <salframe.hxx> #include <salframe.hxx>
#include <vcl/layout.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx> #include <vcl/wrkwin.hxx>
#include <vcl/event.hxx> #include <vcl/event.hxx>
...@@ -807,4 +808,15 @@ void FloatingWindow::AddPopupModeWindow( vcl::Window* pWindow ) ...@@ -807,4 +808,15 @@ void FloatingWindow::AddPopupModeWindow( vcl::Window* pWindow )
mpFirstPopupModeWin = 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -1035,8 +1035,8 @@ void SystemWindow::setPosSizeOnContainee(Size aSize, Window &rBox) ...@@ -1035,8 +1035,8 @@ void SystemWindow::setPosSizeOnContainee(Size aSize, Window &rBox)
{ {
sal_Int32 nBorderWidth = get_border_width(); sal_Int32 nBorderWidth = get_border_width();
aSize.Width() -= mpWindowImpl->mnLeftBorder + mpWindowImpl->mnRightBorder + 2 * nBorderWidth; aSize.Width() -= 2 * nBorderWidth;
aSize.Height() -= nBorderWidth + mpWindowImpl->mnTopBorder + mpWindowImpl->mnBottomBorder + 2 * nBorderWidth; aSize.Height() -= 2 * nBorderWidth;
Point aPos(nBorderWidth, nBorderWidth); Point aPos(nBorderWidth, nBorderWidth);
VclContainer::setLayoutAllocation(rBox, aPos, aSize); VclContainer::setLayoutAllocation(rBox, aPos, aSize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment