Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/styles/qwindowsvistastyle.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    4343#include "qwindowsvistastyle_p.h"
    4444#include <private/qstylehelper_p.h>
     45#include <private/qsystemlibrary_p.h>
    4546
    4647#if !defined(QT_NO_STYLE_WINDOWSVISTA) || defined(QT_PLUGIN)
     
    19271928
    19281929    QSize sz(size);
    1929 
    1930     QSize newSize = QWindowsXPStyle::sizeFromContents(type, option, size, widget);
    19311930    switch (type) {
    1932     case CT_LineEdit:
    1933     case CT_ComboBox:
    1934         {
    1935             HTHEME theme = pOpenThemeData(0, L"Button");
    1936             MARGINS borderSize;
    1937             if (theme) {
    1938                 int result = pGetThemeMargins(theme,
    1939                                               NULL,
    1940                                               BP_PUSHBUTTON,
    1941                                               PBS_NORMAL,
    1942                                               TMT_CONTENTMARGINS,
    1943                                               NULL,
    1944                                               &borderSize);
    1945                 if (result == S_OK) {
    1946                     sz += QSize(borderSize.cxLeftWidth + borderSize.cxRightWidth - 2,
    1947                                 borderSize.cyBottomHeight + borderSize.cyTopHeight - 2);
    1948                 }
    1949                 sz += QSize(23, 0); //arrow button
    1950             }
    1951         }
    1952         return sz;
    19531931    case CT_MenuItem:
    19541932        sz = QWindowsXPStyle::sizeFromContents(type, option, size, widget);
     
    19911969        break;
    19921970    }
    1993     return newSize;
     1971    return QWindowsXPStyle::sizeFromContents(type, option, size, widget);
    19941972}
    19951973
     
    25982576    if (!tried) {
    25992577        tried = true;
    2600         QLibrary themeLib(QLatin1String("uxtheme"));
     2578        QSystemLibrary themeLib(QLatin1String("uxtheme"));
    26012579        pSetWindowTheme         = (PtrSetWindowTheme        )themeLib.resolve("SetWindowTheme");
    26022580        pIsThemePartDefined     = (PtrIsThemePartDefined    )themeLib.resolve("IsThemePartDefined");
Note: See TracChangeset for help on using the changeset viewer.