1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-08 23:24:19 +00:00

BluetoothMidiDevicePairingDialog (iOS): Avoid moving the pairing dialog offscreen when device orientation changes

This commit is contained in:
reuk 2025-11-03 20:55:05 +00:00
parent 514718e037
commit 9d6c0c0f50
No known key found for this signature in database

View file

@ -92,12 +92,15 @@ private:
const int pw = getParentWidth();
const int ph = getParentHeight();
setBounds (0, 0, getParentWidth(), getParentHeight());
nativeSelectorComponent.setBounds (Rectangle<int> (pw, ph)
.withSizeKeepingCentre (jmin (400, pw),
jmin (450, ph - 40)));
}
else
{
setBounds (bounds);
nativeSelectorComponent.setBounds (bounds.withZeroOrigin());
}
}