Support "writing-mode" accessibility text attribute

Change-Id: Ib682b6f7828cfd42050bcb9c846fd8aeb7fdd05f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
bb10
Boris Dušek 2015-02-15 22:50:48 +01:00
parent 8944d2dcbb
commit d4789294a4
1 changed files with 3 additions and 0 deletions

View File

@ -826,6 +826,9 @@ QString QAccessibleTextWidget::attributes(int offset, int *startOffset, int *end
attrs["text-underline-type"] = QStringLiteral("single"); // if underlineStyleValue is set, there is an underline, and Qt does not support other than single ones
} // else both are "none" which is the default - no need to set them
if (block.textDirection() == Qt::RightToLeft)
attrs["writing-mode"] = QStringLiteral("rl");
QTextCharFormat::VerticalAlignment alignment = charFormat.verticalAlignment();
attrs["text-position"] = QString::fromLatin1((alignment == QTextCharFormat::AlignSubScript) ? "sub" : ((alignment == QTextCharFormat::AlignSuperScript) ? "super" : "baseline" ));