EXP-1417 FIXED (Docked Notifications window tears off from the dock icon when deleting notifications one by one)
- Changed LLSysWellWindow::reshapeWindow() so that the floater decreases from bottom to top, without changing top coordinate. - Force dock control repositioning in case floater rect changed.meow-7.2.2
parent
eee8a0e113
commit
06cb4e8602
|
|
@ -100,12 +100,16 @@ void LLDockControl::repositionDockable()
|
|||
if (!mDockWidget) return;
|
||||
LLRect dockRect = mDockWidget->calcScreenRect();
|
||||
LLRect rootRect;
|
||||
LLRect floater_rect = mDockableFloater->calcScreenRect();
|
||||
mGetAllowedRectCallback(rootRect);
|
||||
|
||||
// recalculate dockable position if dock position changed, dock visibility changed,
|
||||
// root view rect changed or recalculation is forced
|
||||
if (mPrevDockRect != dockRect || mDockWidgetVisible != isDockVisible()
|
||||
|| mRootRect != rootRect || mRecalculateDocablePosition)
|
||||
// recalculate dockable position if:
|
||||
if (mPrevDockRect != dockRect //dock position changed
|
||||
|| mDockWidgetVisible != isDockVisible() //dock visibility changed
|
||||
|| mRootRect != rootRect //root view rect changed
|
||||
|| mFloaterRect != floater_rect //floater rect changed
|
||||
|| mRecalculateDockablePosition //recalculation is forced
|
||||
)
|
||||
{
|
||||
// undock dockable and off() if dock not visible
|
||||
if (!isDockVisible())
|
||||
|
|
@ -136,7 +140,8 @@ void LLDockControl::repositionDockable()
|
|||
|
||||
mPrevDockRect = dockRect;
|
||||
mRootRect = rootRect;
|
||||
mRecalculateDocablePosition = false;
|
||||
mFloaterRect = floater_rect;
|
||||
mRecalculateDockablePosition = false;
|
||||
mDockWidgetVisible = isDockVisible();
|
||||
}
|
||||
}
|
||||
|
|
@ -341,7 +346,7 @@ void LLDockControl::on()
|
|||
if (isDockVisible())
|
||||
{
|
||||
mEnabled = true;
|
||||
mRecalculateDocablePosition = true;
|
||||
mRecalculateDockablePosition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -352,7 +357,7 @@ void LLDockControl::off()
|
|||
|
||||
void LLDockControl::forceRecalculatePosition()
|
||||
{
|
||||
mRecalculateDocablePosition = true;
|
||||
mRecalculateDockablePosition = true;
|
||||
}
|
||||
|
||||
void LLDockControl::drawToungue()
|
||||
|
|
|
|||
|
|
@ -80,12 +80,13 @@ private:
|
|||
private:
|
||||
get_allowed_rect_callback_t mGetAllowedRectCallback;
|
||||
bool mEnabled;
|
||||
bool mRecalculateDocablePosition;
|
||||
bool mRecalculateDockablePosition;
|
||||
bool mDockWidgetVisible;
|
||||
DocAt mDockAt;
|
||||
LLView* mDockWidget;
|
||||
LLRect mPrevDockRect;
|
||||
LLRect mRootRect;
|
||||
LLRect mFloaterRect;
|
||||
LLFloater* mDockableFloater;
|
||||
LLUIImagePtr mDockTongue;
|
||||
S32 mDockTongueX;
|
||||
|
|
|
|||
|
|
@ -203,10 +203,9 @@ void LLSysWellWindow::reshapeWindow()
|
|||
{
|
||||
new_window_height = MAX_WINDOW_HEIGHT;
|
||||
}
|
||||
S32 newY = curRect.mTop + new_window_height - curRect.getHeight();
|
||||
S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH
|
||||
: curRect.getWidth();
|
||||
curRect.setLeftTopAndSize(curRect.mLeft, newY, newWidth, new_window_height);
|
||||
S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth();
|
||||
|
||||
curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height);
|
||||
reshape(curRect.getWidth(), curRect.getHeight(), TRUE);
|
||||
setRect(curRect);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue