summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-03-24 09:10:36 +0100
committerMontel Laurent <[email protected]>2016-03-24 09:10:36 +0100
commitd4c02ffe9e703b9f9bf396686e10fb5d3775abc6 (patch)
treebed37f46067e13d67dde249e1cb5e4fff0dd4372
parentcbdb7372eeb7bc507bea4e6ec9f525a077088e07 (diff)
Try to fix label width
-rw-r--r--messageviewer/src/viewer/webengine/mailwebengineaccesskey.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/messageviewer/src/viewer/webengine/mailwebengineaccesskey.cpp b/messageviewer/src/viewer/webengine/mailwebengineaccesskey.cpp
index 466b5a0..984d8c0 100644
--- a/messageviewer/src/viewer/webengine/mailwebengineaccesskey.cpp
+++ b/messageviewer/src/viewer/webengine/mailwebengineaccesskey.cpp
@@ -243,7 +243,8 @@ void MailWebEngineAccessKey::makeAccessKeyLabel(QChar accessKey, const MessageVi
font.setBold(true);
label->setFont(font);
label->setText(accessKey);
- qDebug()<<" accessKey"<<accessKey<< label->width();
+ QFontMetrics metric(label->font());
+ label->setFixedWidth(metric.width(QStringLiteral("WW")));
label->setPalette(QToolTip::palette());
label->setAutoFillBackground(true);
label->setFrameStyle(QFrame::Box | QFrame::Plain);