* Computer the position of the top-left corner of a window to be opened right * under the toolbar. * @param window_width the width of the window to get the position for. * @return Coordinate of the top-left corner of the new window. */
| 1683 | * @return Coordinate of the top-left corner of the new window. |
| 1684 | */ |
| 1685 | Point GetToolbarAlignedWindowPosition(int window_width) |
| 1686 | { |
| 1687 | const Window *w = FindWindowById(WC_MAIN_TOOLBAR, 0); |
| 1688 | assert(w != nullptr); |
| 1689 | Point pt = { _current_text_dir == TD_RTL ? w->left : (w->left + w->width) - window_width, w->top + w->height }; |
| 1690 | return pt; |
| 1691 | } |
| 1692 | |
| 1693 | /** |
| 1694 | * Compute the position of the construction toolbars. |
no test coverage detected