Kaydet (Commit) 2a4cd80a authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Fix ToolbarMenu position

Change-Id: I3a6380845687a809e155ebcf8ff8d3b2e5e6a4ec
üst c9303b98
......@@ -968,11 +968,11 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
mpOldBorderWin = nullptr; // no border window found
bool bAllowTearOff = bool( nFlags & FloatWinPopupFlags::AllowTearOff );
bool bIsToolBox = GetWindow()->GetType() == WINDOW_TOOLBOX;
bool bUseStdPopup = bAllowTearOff && GetWindow()->GetType() != WINDOW_TOOLBOX;
// the new parent for popup mode
VclPtr<FloatingWindow> pWin;
if ( bAllowTearOff && !bIsToolBox )
if ( bUseStdPopup )
pWin = VclPtr<FloatingWindow>::Create( mpParent, WB_STDPOPUP );
else
pWin = VclPtr<ImplPopupFloatWin>::Create( mpParent, this, bAllowTearOff );
......@@ -988,7 +988,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
GetWindow()->mpWindowImpl->mnBottomBorder = 0;
// position toolbox below the drag grip
if ( bIsToolBox )
if ( !bUseStdPopup )
GetWindow()->SetPosPixel( static_cast<ImplPopupFloatWin*>( pWin.get() )->GetToolboxPosition() );
// reparent borderwindow and window
......
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