Skip to content

Commit

Permalink
[Fix] Don't limit update tooltip horizontal position to right border …
Browse files Browse the repository at this point in the history
…of main window if the toolbar is floating.

git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22177 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Nov 13, 2024
1 parent 1cce801 commit 55f9e76
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mptrack/Mainbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,11 @@ bool CMainToolBar::ShowUpdateInfo(const CString &newVersion, const CString &info
GetToolBarCtrl().GetRect(ID_UPDATE_AVAILABLE, &rect);
CPoint pt = rect.CenterPoint();
ClientToScreen(&pt);
CMainFrame::GetMainFrame()->GetWindowRect(rect);
LimitMax(pt.x, rect.right);
if(!IsFloating())
{
CMainFrame::GetMainFrame()->GetWindowRect(rect);
LimitMax(pt.x, rect.right);
}

return m_tooltip.ShowUpdate(*this, newVersion, infoURL, rect, pt, ID_UPDATE_AVAILABLE);
}
Expand Down

0 comments on commit 55f9e76

Please sign in to comment.