mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Scale C++ menus down to fit the window (#14690)
This commit is contained in:
@@ -62,14 +62,9 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
|
||||
/*
|
||||
Calculate new sizes and positions
|
||||
*/
|
||||
const float s = m_gui_scale;
|
||||
|
||||
DesiredRect = core::rect<s32>(
|
||||
screensize.X / 2 - 580 * s / 2,
|
||||
screensize.Y / 2 - 300 * s / 2,
|
||||
screensize.X / 2 + 580 * s / 2,
|
||||
screensize.Y / 2 + 300 * s / 2
|
||||
);
|
||||
ScalingInfo info = getScalingInfo(screensize, v2u32(580, 300));
|
||||
const float s = info.scale;
|
||||
DesiredRect = info.rect;
|
||||
recalculateAbsolutePosition(false);
|
||||
|
||||
v2s32 size = DesiredRect.getSize();
|
||||
|
Reference in New Issue
Block a user