macOS accessibility: Implement accessibilityFrame

Change-Id: Id78d3826eb18ff5ca306ac190543a7ff37b2f014
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
This commit is contained in:
Frederik Gladhorn 2018-11-21 11:30:37 +01:00
parent e209321966
commit 384b9d8fed

View File

@ -268,6 +268,13 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
return nil;
}
- (NSRect)accessibilityFrame {
QAccessibleInterface *iface = QAccessible::accessibleInterface(axid);
if (!iface || !iface->isValid())
return NSZeroRect;
return QCocoaScreen::mapToNative(iface->rect());
}
- (id) minValueAttribute:(QAccessibleInterface*)iface {
if (QAccessibleValueInterface *val = iface->valueInterface())
return @(val->minimumValue().toDouble());