QGtkStyle: identify QtQuick.Controls.GroupBox as QAccessible::Grouping
This allows QGtkStyle to check the role and do appropriate styling (bold font) for the label. Task-number: QTBUG-43736 Change-Id: I735f5f7ffadd7a435fa9e28fab45b202eec0252e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>bb10
parent
37b7c5164c
commit
595c91f58a
|
|
@ -3633,6 +3633,13 @@ QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComple
|
|||
QFont font = widget->font();
|
||||
font.setBold(true);
|
||||
fontMetrics = QFontMetrics(font);
|
||||
} else if (QStyleHelper::isInstanceOf(groupBox->styleObject, QAccessible::Grouping)) {
|
||||
QVariant var = groupBox->styleObject->property("font");
|
||||
if (var.isValid() && var.canConvert<QFont>()) {
|
||||
QFont font = var.value<QFont>();
|
||||
font.setBold(true);
|
||||
fontMetrics = QFontMetrics(font);
|
||||
}
|
||||
}
|
||||
|
||||
QSize textRect = fontMetrics.boundingRect(groupBox->text).size() + QSize(4, 4);
|
||||
|
|
|
|||
Loading…
Reference in New Issue