summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-03 05:21:49 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-03 05:21:49 (GMT)
commitce01f19674923cb5144bb56fe76ecbe19865d3bd (patch)
tree2235ab6b1b469ca0232ccf621309e3a90d770e2a /src/gui/styles
parentdaeb81493aef4fd8f632ba4ea7f8d12ed80fa7be (diff)
parent1358c4b53cf4cec83ea6d9b0f886b99f76c4847e (diff)
downloadQt-ce01f19674923cb5144bb56fe76ecbe19865d3bd.zip
Qt-ce01f19674923cb5144bb56fe76ecbe19865d3bd.tar.gz
Qt-ce01f19674923cb5144bb56fe76ecbe19865d3bd.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Consolidate zlib configuration redundancy Fixed whitespace formatting Fix incomplete support for built-in jpeg, mng, tiff and gif handlers Split image handler plugin project files No explicit link to zlib/jpeg for system mng/tiff Removed stray line continuations Long live else! qdoc: Added a solution for creating tables of contents for manuals. Doc: Fixed markup. Fixed size hint for combo box on windows
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qwindowsvistastyle.cpp25
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp4
2 files changed, 4 insertions, 25 deletions
diff --git a/src/gui/styles/qwindowsvistastyle.cpp b/src/gui/styles/qwindowsvistastyle.cpp
index 67a7b85..8511592 100644
--- a/src/gui/styles/qwindowsvistastyle.cpp
+++ b/src/gui/styles/qwindowsvistastyle.cpp
@@ -1926,30 +1926,7 @@ QSize QWindowsVistaStyle::sizeFromContents(ContentsType type, const QStyleOption
return QWindowsStyle::sizeFromContents(type, option, size, widget);
QSize sz(size);
-
- QSize newSize = QWindowsXPStyle::sizeFromContents(type, option, size, widget);
switch (type) {
- case CT_LineEdit:
- case CT_ComboBox:
- {
- HTHEME theme = pOpenThemeData(0, L"Button");
- MARGINS borderSize;
- if (theme) {
- int result = pGetThemeMargins(theme,
- NULL,
- BP_PUSHBUTTON,
- PBS_NORMAL,
- TMT_CONTENTMARGINS,
- NULL,
- &borderSize);
- if (result == S_OK) {
- sz += QSize(borderSize.cxLeftWidth + borderSize.cxRightWidth - 2,
- borderSize.cyBottomHeight + borderSize.cyTopHeight - 2);
- }
- sz += QSize(23, 0); //arrow button
- }
- }
- return sz;
case CT_MenuItem:
sz = QWindowsXPStyle::sizeFromContents(type, option, size, widget);
int minimumHeight;
@@ -1990,7 +1967,7 @@ QSize QWindowsVistaStyle::sizeFromContents(ContentsType type, const QStyleOption
default:
break;
}
- return newSize;
+ return QWindowsXPStyle::sizeFromContents(type, option, size, widget);
}
/*!
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index efb1224..8743807 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -3678,7 +3678,9 @@ QSize QWindowsXPStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt
sz += QSize(borderSize.cxLeftWidth + borderSize.cxRightWidth - 2,
borderSize.cyBottomHeight + borderSize.cyTopHeight - 2);
}
- sz += QSize(23, 0); //arrow button
+ const int textMargins = 2*(proxy()->pixelMetric(PM_FocusFrameHMargin) + 1);
+ sz += QSize(qMax(pixelMetric(QStyle::PM_ScrollBarExtent, option, widget)
+ + textMargins, 23), 0); //arrow button
}
}
break;