summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-05-07 15:39:58 +0300
committerSami Merila <sami.merila@nokia.com>2010-05-07 15:39:58 +0300
commit039d232a13b128ae01cda0e5572edf7474983641 (patch)
tree978bc7af8b8511b963695e3da1ef7cfc5f5cc889 /src/gui
parent48c414f5f5f60aafa0c7b45bafb2b8374eb63e01 (diff)
QS60Style - PushButton with text and with icon should be of same size
When pushbutton contains standardIcon or non-modified text, it should be of same size. As a fix, style now checking default text height for icon pushbuttons and if the icon is smaller than text height, style will make button to match text height content. Task-number: QT-2179 Reviewed-by: Alessandro Portale
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qs60style.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 326335a131..56d52b127f 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2508,7 +2508,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
sz += QSize(pixelMetric(PM_IndicatorWidth) + pixelMetric(PM_CheckBoxLabelSpacing), 0);
const int iconHeight = (!buttonWidget->icon().isNull()) ? buttonWidget->iconSize().height() : 0;
const int textHeight = (buttonWidget->text().length() > 0) ?
- buttonWidget->fontMetrics().size(Qt::TextSingleLine, buttonWidget->text()).height() : 0;
+ buttonWidget->fontMetrics().size(Qt::TextSingleLine, buttonWidget->text()).height() : opt->fontMetrics.height();
const int decoratorHeight = (buttonWidget->isCheckable()) ? pixelMetric(PM_IndicatorHeight) : 0;
const int contentHeight =