Change: Use scaled WidgetDimensions.
This commit is contained in:
@@ -1639,7 +1639,7 @@ static Point GetAutoPlacePosition(int width, int height)
|
||||
*/
|
||||
int left = rtl ? _screen.width - width : 0, top = toolbar_y;
|
||||
int offset_x = rtl ? -(int)NWidgetLeaf::closebox_dimension.width : (int)NWidgetLeaf::closebox_dimension.width;
|
||||
int offset_y = std::max<int>(NWidgetLeaf::closebox_dimension.height, FONT_HEIGHT_NORMAL + WD_CAPTIONTEXT_TOP + WD_CAPTIONTEXT_BOTTOM);
|
||||
int offset_y = std::max<int>(NWidgetLeaf::closebox_dimension.height, FONT_HEIGHT_NORMAL + WidgetDimensions::scaled.captiontext.Vertical());
|
||||
|
||||
restart:
|
||||
for (const Window *w : Window::Iterate()) {
|
||||
@@ -1705,7 +1705,7 @@ static Point LocalGetWindowPlacement(const WindowDesc *desc, int16 sm_width, int
|
||||
* - Y position: closebox of parent + closebox of child + statusbar
|
||||
* - X position: closebox on left/right, resizebox on right/left (depending on ltr/rtl)
|
||||
*/
|
||||
int indent_y = std::max<int>(NWidgetLeaf::closebox_dimension.height, FONT_HEIGHT_NORMAL + WD_CAPTIONTEXT_TOP + WD_CAPTIONTEXT_BOTTOM);
|
||||
int indent_y = std::max<int>(NWidgetLeaf::closebox_dimension.height, FONT_HEIGHT_NORMAL + WidgetDimensions::scaled.captiontext.Vertical());
|
||||
if (w->top + 3 * indent_y < _screen.height) {
|
||||
pt.y = w->top + indent_y;
|
||||
int indent_close = NWidgetLeaf::closebox_dimension.width;
|
||||
|
Reference in New Issue
Block a user