qtextayout can't show mnemonics, so when there is a qaction use
painter.drawtext (unlikely we will have a multiline caption in this case) this should fix the & appearing in the desktop toolbox svn path=/trunk/KDE/kdelibs/; revision=969532
This commit is contained in:
parent
939954fac0
commit
9622b2cfe8
@ -915,7 +915,13 @@ void IconWidgetPrivate::drawTextItems(QPainter *painter,
|
||||
// when applied to the canvas
|
||||
painter->translate(0.5, 0.5);
|
||||
|
||||
labelLayout.draw(painter, QPointF());
|
||||
if (action) {
|
||||
QRectF textRect = labelLayout.boundingRect();
|
||||
textRect.moveTopLeft(labelLayout.position());
|
||||
painter->drawText(textRect, Qt::TextShowMnemonic, action->text());
|
||||
} else {
|
||||
labelLayout.draw(painter, QPointF());
|
||||
}
|
||||
|
||||
if (!infoLayout.text().isEmpty()) {
|
||||
painter->setPen(textColor);
|
||||
|
Loading…
x
Reference in New Issue
Block a user