src/gui/widgets/qradiobutton.cpp
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
   193     if (d->sizeHint.isValid())
   193     if (d->sizeHint.isValid())
   194         return d->sizeHint;
   194         return d->sizeHint;
   195     ensurePolished();
   195     ensurePolished();
   196     QStyleOptionButton opt;
   196     QStyleOptionButton opt;
   197     initStyleOption(&opt);
   197     initStyleOption(&opt);
   198     QSize sz = style()->itemTextRect(fontMetrics(), QRect(0, 0, 1, 1), Qt::TextShowMnemonic,
   198     QSize sz = style()->itemTextRect(fontMetrics(), QRect(), Qt::TextShowMnemonic,
   199                                      false, text()).size();
   199                                      false, text()).size();
   200     if (!opt.icon.isNull())
   200     if (!opt.icon.isNull())
   201         sz = QSize(sz.width() + opt.iconSize.width() + 4, qMax(sz.height(), opt.iconSize.height()));
   201         sz = QSize(sz.width() + opt.iconSize.width() + 4, qMax(sz.height(), opt.iconSize.height()));
   202     d->sizeHint = (style()->sizeFromContents(QStyle::CT_RadioButton, &opt, sz, this).
   202     d->sizeHint = (style()->sizeFromContents(QStyle::CT_RadioButton, &opt, sz, this).
   203                   expandedTo(QApplication::globalStrut()));
   203                   expandedTo(QApplication::globalStrut()));