summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-29 15:25:19 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-29 15:25:19 (GMT)
commit75ec5d485dfa8f43306bfea5993d6a8aae7abb45 (patch)
tree8ed957f6823b908fcd2700629683005a2e16288d /src/gui/styles
parent26af4d54ea4f3a48d053038f34a00aa1119a585b (diff)
parent4f584d5d4c53d8510a34a698fac0f78c17f6cb93 (diff)
downloadQt-75ec5d485dfa8f43306bfea5993d6a8aae7abb45.zip
Qt-75ec5d485dfa8f43306bfea5993d6a8aae7abb45.tar.gz
Qt-75ec5d485dfa8f43306bfea5993d6a8aae7abb45.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Remove left over forward declarations Avoided the loss of preedit text when losing focus on Symbian. Added support for ifdeffing for manufacturer in generated pkg files Shortening and fixing previous fix for QTBUG-6371 Update default FPU flags on Symbian to be softvfp+vfpv2 Using RunFast mode for RVCT
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qs60style.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 9b99161..a40a84c 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2400,21 +2400,13 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
break;
#ifndef QT_NO_COMBOBOX
case CT_ComboBox:
- if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
- const int frameWidth = cmb->frame ? pixelMetric(PM_ComboBoxFrameWidth, opt, widget) * 2 : 0;
- const int textMargins = 2*(pixelMetric(PM_FocusFrameHMargin) + 1);
- const int smallestExtraWidth = 23;
- // QItemDelegate::sizeHint expands the textMargins two times, thus the 2*textMargins...
- const int extra =
- qMax(smallestExtraWidth, 2*textMargins + pixelMetric(PM_ScrollBarExtent, opt, widget));
- sz = QSize(sz.width() + frameWidth + extra, sz.height() + frameWidth);
- int maxScreenWidth = QApplication::desktop()->availableGeometry().size().width();
- if (sz.width() > maxScreenWidth) {
- maxScreenWidth = maxScreenWidth - (extra + frameWidth);
- sz.setWidth(maxScreenWidth);
- }
- }
- break;
+ // Fixing Ui design issues with too wide QComboBoxes and greedy SizeHints
+ // Make sure, that the combobox says within the screen.
+ const QSize desktopContentSize = QApplication::desktop()->availableGeometry().size()
+ -QSize(pixelMetric(PM_LayoutLeftMargin) + pixelMetric(PM_LayoutRightMargin), 0);
+ sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget).
+ boundedTo(desktopContentSize);
+ break;
#endif
default:
sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget);