vcl/source/window/brdwin.cxx | 4 ++-- vcl/source/window/dockmgr.cxx | 2 +- vcl/source/window/floatwin.cxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit 829b0564959411d0cc64169fe69153a714050c0d Author: Maxim Monastirsky <momonas...@gmail.com> Date: Wed Jan 17 21:08:59 2018 +0200 tdf#115057 Never use ImplPopupFloatWin for anything except ToolBox ImplPopupFloatWin draws the window title and frame directly on the client window, which is incompatible with .ui layouts, as they try to occupy the whole available space. Instead just use a plain FloatingWindow whenever possible, and change the border window code to mimic the behavior of ImplPopupFloatWin, wrt removing part of the frame of toolbar popups w/o a title. Change-Id: If72ea89e31f913470faad7fcb8083f9b9787c9a8 Reviewed-on: https://gerrit.libreoffice.org/48094 Reviewed-by: Maxim Monastirsky <momonas...@gmail.com> Tested-by: Maxim Monastirsky <momonas...@gmail.com> diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index c929d0be35f8..5d8b14c7cde9 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1418,7 +1418,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con vcl::Region oldClipRgn(rRenderContext.GetClipRegion()); // for popups, don't draw part of the frame - if (pData->mnTitleType == BorderWindowTitleType::Popup) + if (pData->mnTitleType >= BorderWindowTitleType::Popup) { FloatingWindow* pWin = dynamic_cast<FloatingWindow*>(pData->mpBorderWindow->GetWindow(GetWindowType::Client)); if (pWin) @@ -1444,7 +1444,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con --aInRect.Bottom(); // restore - if (pData->mnTitleType == BorderWindowTitleType::Popup) + if (pData->mnTitleType >= BorderWindowTitleType::Popup) rRenderContext.SetClipRegion(oldClipRgn); // Draw Border diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index ef290c642ced..57b83e568215 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -933,7 +933,7 @@ void ImplDockingWindowWrapper::ImplPreparePopupMode( FloatWinPopupFlags nFlags ) mpOldBorderWin = nullptr; // no border window found bool bAllowTearOff = bool( nFlags & FloatWinPopupFlags::AllowTearOff ); - bool bUseStdPopup = bAllowTearOff && GetWindow()->GetType() != WindowType::TOOLBOX; + bool bUseStdPopup = GetWindow()->GetType() != WindowType::TOOLBOX; // the new parent for popup mode VclPtr<FloatingWindow> pWin; diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 6377c6c6f853..304fadb40eb9 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -427,7 +427,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow, aPos = pW->AbsoluteScreenToOutputPixel( aPos ); // store a cliprect that can be used to clip the common edge of the itemrect and the floating window - if( pFloatingWindow ) + if( pFloatingWindow && pFloatingWindow->mpImplData->mpBox ) { pFloatingWindow->mpImplData->maItemEdgeClipRect = tools::Rectangle( e1, e2 ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits