Kaydet (Commit) 94fdd160 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Launch pop-up right-aligned in case the cell is wider than the popup.

Or else the popup and the popup button would get separated.

Change-Id: I4c8dda2bf5cebe0fe0e0ce64c9c213e2926d9570
üst 46aec301
...@@ -1354,7 +1354,17 @@ void ScCheckListMenuWindow::launch(const Rectangle& rRect) ...@@ -1354,7 +1354,17 @@ void ScCheckListMenuWindow::launch(const Rectangle& rRect)
// We need to have at least one member selected. // We need to have at least one member selected.
maBtnOk.Enable(maChecks.GetCheckedEntryCount() != 0); maBtnOk.Enable(maChecks.GetCheckedEntryCount() != 0);
StartPopupMode(rRect, (FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_GRABFOCUS)); Rectangle aRect(rRect);
if (maWndSize.Width() < aRect.GetWidth())
{
// Target rectangle (i.e. cell width) is wider than the window.
// Simulate right-aligned launch by modifying the target rectangle
// size.
long nDiff = aRect.GetWidth() - maWndSize.Width();
aRect.Left() += nDiff;
}
StartPopupMode(aRect, (FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_GRABFOCUS));
} }
void ScCheckListMenuWindow::close(bool bOK) void ScCheckListMenuWindow::close(bool bOK)
......
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