summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-28 20:10:25 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-28 20:10:25 (GMT)
commit4f584d5d4c53d8510a34a698fac0f78c17f6cb93 (patch)
tree0cabe4b1280615b6f7546d731e744b95dc37016c /src/gui/styles
parent9d636095403f5abecbdff8ffffe658f35ff10001 (diff)
parentfefbe54d8c511951da79569770275451199cd877 (diff)
downloadQt-4f584d5d4c53d8510a34a698fac0f78c17f6cb93.zip
Qt-4f584d5d4c53d8510a34a698fac0f78c17f6cb93.tar.gz
Qt-4f584d5d4c53d8510a34a698fac0f78c17f6cb93.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);