diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-02 20:58:55 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-02 20:58:55 (GMT) |
commit | 1358c4b53cf4cec83ea6d9b0f886b99f76c4847e (patch) | |
tree | a019bc5a4fba7de4980c8f0cb5bee3e7a42f57f4 /src/gui/styles | |
parent | 0eee17b5d789c2314f582e363e377809ef6dea7c (diff) | |
parent | eaf757a5c449e115ced427a0129fb2209fd09e29 (diff) | |
download | Qt-1358c4b53cf4cec83ea6d9b0f886b99f76c4847e.zip Qt-1358c4b53cf4cec83ea6d9b0f886b99f76c4847e.tar.gz Qt-1358c4b53cf4cec83ea6d9b0f886b99f76c4847e.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.cpp | 25 | ||||
-rw-r--r-- | src/gui/styles/qwindowsxpstyle.cpp | 4 |
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; |