iOS: Remove NSView.safeAreaInsets wrapper
The API is available on all iOS versions we support nowadays. Pick-to: 6.6 6.5 Change-Id: Ia58c5ad1649e7e6b22f9c56a809e2455586a8e5a Reviewed-by: Amr Elsayed <amr.elsayed@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit a89a916377f774ea55b43afc56cb89070097883f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
3b428d6f28
commit
eefb27bb3f
@ -323,7 +323,7 @@ void QIOSScreen::updateProperties()
|
||||
// and do not take split-view constraints into account, so we have to
|
||||
// combine the two to get the correct available geometry.
|
||||
QRect applicationFrame = QRectF::fromCGRect(m_uiScreen.qt_applicationFrame).toRect();
|
||||
UIEdgeInsets safeAreaInsets = m_uiWindow.qt_safeAreaInsets;
|
||||
UIEdgeInsets safeAreaInsets = m_uiWindow.safeAreaInsets;
|
||||
m_availableGeometry = m_geometry.adjusted(safeAreaInsets.left, safeAreaInsets.top,
|
||||
-safeAreaInsets.right, -safeAreaInsets.bottom).intersected(applicationFrame);
|
||||
|
||||
|
@ -227,7 +227,7 @@ void QIOSWindow::applyGeometry(const QRect &rect)
|
||||
|
||||
QMargins QIOSWindow::safeAreaMargins() const
|
||||
{
|
||||
UIEdgeInsets safeAreaInsets = m_view.qt_safeAreaInsets;
|
||||
UIEdgeInsets safeAreaInsets = m_view.safeAreaInsets;
|
||||
return QMargins(safeAreaInsets.left, safeAreaInsets.top,
|
||||
safeAreaInsets.right, safeAreaInsets.bottom);
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ QT_END_NAMESPACE
|
||||
- (QWindow *)qwindow;
|
||||
- (UIViewController *)viewController;
|
||||
- (QIOSViewController*)qtViewController;
|
||||
@property (nonatomic, readonly) UIEdgeInsets qt_safeAreaInsets;
|
||||
@end
|
||||
|
||||
#ifdef Q_OS_IOS
|
||||
|
@ -829,11 +829,6 @@ inline ulong getTimeStamp(UIEvent *event)
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (UIEdgeInsets)qt_safeAreaInsets
|
||||
{
|
||||
return self.safeAreaInsets;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#ifdef Q_OS_IOS
|
||||
|
Loading…
x
Reference in New Issue
Block a user