diff options
Diffstat (limited to 'src/plugins/styles')
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 152d51da1a..e6939a0fda 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -3520,9 +3520,12 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter proxy()->drawItemPixmap(p, pixr, Qt::AlignVCenter, pixmap); textr.translate(pixmap.width() / pixmap.devicePixelRatio() + 2, 0); } + QString text = header->text; + if (header->textElideMode != Qt::ElideNone) + text = header->fontMetrics.elidedText(text, header->textElideMode, textr.width()); proxy()->drawItemText(p, textr, header->textAlignment | Qt::AlignVCenter, header->palette, - header->state & State_Enabled, header->text, QPalette::ButtonText); + header->state.testFlag(State_Enabled), text, QPalette::ButtonText); p->restore(); } break; |