![]() |
Qt 6.x
The Qt SDK
|
#include <QtCore/qt_windows.h>
#include "qwindowstheme.h"
#include "qwindowsmenu.h"
#include "qwindowsdialoghelpers.h"
#include "qwindowscontext.h"
#include "qwindowsintegration.h"
#include "qwindowsscreen.h"
#include <commctrl.h>
#include <objbase.h>
#include <commoncontrols.h>
#include <shellapi.h>
#include <QtCore/qvariant.h>
#include <QtCore/qcoreapplication.h>
#include <QtCore/qdebug.h>
#include <QtCore/qsysinfo.h>
#include <QtCore/qcache.h>
#include <QtCore/qthread.h>
#include <QtCore/qmutex.h>
#include <QtCore/qwaitcondition.h>
#include <QtGui/qcolor.h>
#include <QtGui/qpalette.h>
#include <QtGui/qguiapplication.h>
#include <QtGui/qpainter.h>
#include <QtGui/qpixmapcache.h>
#include <qpa/qwindowsysteminterface.h>
#include <QtGui/private/qabstractfileiconengine_p.h>
#include <QtGui/private/qwindowsfontdatabase_p.h>
#include <private/qhighdpiscaling_p.h>
#include <private/qsystemlibrary_p.h>
#include <private/qwinregistry_p.h>
#include <QtCore/private/qfunctions_win_p.h>
#include <algorithm>
Go to the source code of this file.
Classes | |
struct | QShGetFileInfoParams |
class | QShGetFileInfoThread |
class | FakePointer< T > |
class | QWindowsFileIconEngine |
Enumerations | |
enum | FileIconSize { SmallFileIcon , LargeFileIcon , ExtraLargeFileIcon , JumboFileIcon , FileIconSizeCount } |
enum | { sHIL_EXTRALARGE = 0x2 , sHIL_JUMBO = 0x4 } |
Functions | |
static bool | booleanSystemParametersInfo (UINT what, bool defaultValue) |
static DWORD | dWordSystemParametersInfo (UINT what, DWORD defaultValue) |
static QColor | mixColors (const QColor &c1, const QColor &c2) |
static QColor | getSysColor (int index) |
static bool | shGetFileInfoBackground (const QString &fileName, DWORD attributes, SHFILEINFO *info, UINT flags, qint64 timeOutMSecs=5000) |
static QPalette | standardPalette () |
static QColor | placeHolderColor (QColor textColor) |
static QColor | qt_accentColor () |
static void | populateLightSystemBasePalette (QPalette &result) |
static void | populateDarkSystemBasePalette (QPalette &result) |
static QPalette | toolTipPalette (const QPalette &systemPalette, bool light) |
static QPalette | menuPalette (const QPalette &systemPalette, bool light) |
static QPalette * | menuBarPalette (const QPalette &menuPalette, bool light) |
static QStringList | iconThemeSearchPaths () |
static QStringList | styleNames () |
static int | uiEffects () |
QDebug | operator<< (QDebug d, const NONCLIENTMETRICS &m) |
Q_GUI_EXPORT QPixmap | qt_pixmapFromWinHICON (HICON icon) |
static QPixmap | loadIconFromShell32 (int resourceId, QSizeF size) |
static QString | dirIconPixmapCacheKey (int iIcon, int iconSize, int imageListSize) |
static QPixmap | pixmapFromShellImageList (int iImageList, const SHFILEINFO &info) |
static bool | doUseNativeMenus () |
Variables | |
static int | fileIconSizes [FileIconSizeCount] |
anonymous enum |
Enumerator | |
---|---|
sHIL_EXTRALARGE | |
sHIL_JUMBO |
Definition at line 877 of file qwindowstheme.cpp.
enum FileIconSize |
Enumerator | |
---|---|
SmallFileIcon | |
LargeFileIcon | |
ExtraLargeFileIcon | |
JumboFileIcon | |
FileIconSizeCount |
Definition at line 682 of file qwindowstheme.cpp.
|
inlinestatic |
Definition at line 59 of file qwindowstheme.cpp.
Referenced by menuBarPalette(), menuPalette(), QWindowsTheme::queryHighContrast(), QWindowsTheme::themeHint(), and uiEffects().
|
static |
Definition at line 882 of file qwindowstheme.cpp.
References iconSize, QString::number(), sHIL_EXTRALARGE, and sHIL_JUMBO.
Referenced by QWindowsFileIconEngine::filePixmap().
|
inlinestatic |
Definition at line 1074 of file qwindowstheme.cpp.
References QWindowsIntegration::AlwaysUseNativeMenus, inherits(), QWindowsIntegration::instance(), QCoreApplication::instance(), QWindowsIntegration::NoNativeMenus, QWindowsIntegration::options(), and QGuiApplication::topLevelWindows().
Referenced by QWindowsTheme::useNativeMenus().
|
inlinestatic |
Definition at line 67 of file qwindowstheme.cpp.
Referenced by QWindowsTheme::themeHint().
|
inlinestatic |
Definition at line 82 of file qwindowstheme.cpp.
Referenced by menuBarPalette(), menuPalette(), populateDarkSystemBasePalette(), populateLightSystemBasePalette(), and toolTipPalette().
|
inlinestatic |
Definition at line 459 of file qwindowstheme.cpp.
References QFileInfo::absoluteFilePath(), QCoreApplication::applicationDirPath(), and QFileInfo::isDir().
Referenced by QWindowsTheme::themeHint().
Definition at line 737 of file qwindowstheme.cpp.
References qt_pixmapFromWinHICON().
Referenced by QWindowsTheme::standardPixmap().
Definition at line 426 of file qwindowstheme.cpp.
References QPalette::Active, booleanSystemParametersInfo(), QPalette::Button, QPalette::Disabled, getSysColor(), QPalette::Inactive, menuPalette(), and SPI_GETFLATMENU.
Definition at line 387 of file qwindowstheme.cpp.
References QPalette::Active, booleanSystemParametersInfo(), QPalette::Button, QPalette::ButtonText, QPalette::color(), QPalette::Dark, QPalette::Disabled, disabled, getSysColor(), QPalette::Highlight, QPalette::HighlightedText, QPalette::Inactive, SPI_GETFLATMENU, QPalette::Text, and QPalette::WindowText.
Referenced by menuBarPalette().
Definition at line 75 of file qwindowstheme.cpp.
References QColor::blue(), c2, QColor::green(), and QColor::red().
Referenced by QWindowsTheme::systemPalette(), and toolTipPalette().
Definition at line 627 of file qwindowstheme.cpp.
References d, and QWindowsFontDatabase::debugFormat().
|
static |
Definition at line 920 of file qwindowstheme.cpp.
References IID, info, Q_UNUSED, and qt_pixmapFromWinHICON().
Referenced by QWindowsFileIconEngine::filePixmap().
Definition at line 218 of file qwindowstheme.cpp.
References QColor::setAlpha().
Referenced by populateDarkSystemBasePalette(), and populateLightSystemBasePalette().
Definition at line 293 of file qwindowstheme.cpp.
References QPalette::AccentColor, QPalette::All, QPalette::AlternateBase, QPalette::Base, Qt::black, QPalette::BrightText, QPalette::Button, QPalette::ButtonText, QPalette::Dark, QColor::darker(), getSysColor(), QPalette::Highlight, QPalette::HighlightedText, QPalette::Light, QColor::lighter(), QColor::lightness(), QPalette::Link, QPalette::LinkVisited, QPalette::Mid, QPalette::Midlight, placeHolderColor(), QPalette::PlaceholderText, qt_accentColor(), settings, QPalette::Shadow, QPalette::Text, QPalette::ToolTipBase, QPalette::ToolTipText, Qt::white, QPalette::Window, and QPalette::WindowText.
Referenced by QWindowsTheme::systemPalette().
Definition at line 244 of file qwindowstheme.cpp.
References QPalette::AccentColor, QPalette::Base, QPalette::BrightText, QPalette::Button, QPalette::ButtonText, QPalette::Dark, QColor::darker(), getSysColor(), QPalette::Highlight, QPalette::HighlightedText, QPalette::Inactive, QPalette::Light, QPalette::Link, QPalette::LinkVisited, QPalette::Mid, QPalette::Midlight, placeHolderColor(), QPalette::PlaceholderText, qt_accentColor(), settings, QPalette::Shadow, QPalette::Text, QPalette::Window, and QPalette::WindowText.
Referenced by QWindowsTheme::systemPalette().
|
inlinestatic |
Definition at line 224 of file qwindowstheme.cpp.
References QColor::alpha(), QColor::blue(), QColor::fromRgb(), QColor::fromRgba(), QColor::green(), QWinRegistryKey::isValid(), QColor::isValid(), QColor::red(), and QWinRegistryKey::value().
Referenced by populateDarkSystemBasePalette(), and populateLightSystemBasePalette().
Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON | ( | HICON | icon | ) |
Definition at line 645 of file qpixmap_win.cpp.
References QPixmap::fromImage(), and icon.
Referenced by QWindowsFileIconEngine::filePixmap(), loadIconFromShell32(), pixmapFromShellImageList(), and QWindowsTheme::standardPixmap().
|
static |
Definition at line 178 of file qwindowstheme.cpp.
References QShGetFileInfoThread::cancel(), fileName, info, qWarning, QShGetFileInfoThread::runWithParams(), and QThread::start().
Referenced by QWindowsFileIconEngine::filePixmap().
|
inlinestatic |
Definition at line 202 of file qwindowstheme.cpp.
References QPalette::Base, Qt::black, QPalette::ButtonText, QColor::darker(), QPalette::Disabled, Qt::gray, QColor::lighter(), palette, QPalette::Text, Qt::white, and QPalette::WindowText.
Referenced by QWindowsTheme::systemPalette().
|
inlinestatic |
Definition at line 465 of file qwindowstheme.cpp.
References QStringLiteral.
Referenced by QMacStyle::standardPalette(), QGenericUnixTheme::themeHint(), QGnomeTheme::themeHint(), and QWindowsTheme::themeHint().
Definition at line 357 of file qwindowstheme.cpp.
References QPalette::All, QPalette::Base, QPalette::BrightText, QPalette::Button, QPalette::button(), QPalette::ButtonText, QPalette::buttonText(), QBrush::color(), QColor::darker(), QPalette::Disabled, disabled, getSysColor(), mixColors(), QPalette::Text, QPalette::ToolTipBase, QPalette::ToolTipText, Qt::white, QPalette::Window, and QPalette::WindowText.
Referenced by qt_init_tooltip_palette().
|
inlinestatic |
Definition at line 470 of file qwindowstheme.cpp.
References QPlatformTheme::AnimateComboUiEffect, QPlatformTheme::AnimateMenuUiEffect, QPlatformTheme::AnimateTooltipUiEffect, booleanSystemParametersInfo(), QPlatformTheme::FadeMenuUiEffect, QPlatformTheme::GeneralUiEffect, QPlatformTheme::HoverEffect, SPI_GETCOMBOBOXANIMATION, SPI_GETMENUANIMATION, SPI_GETMENUFADE, SPI_GETTOOLTIPANIMATION, and SPI_GETUIEFFECTS.
Referenced by QWindowsTheme::themeHint().
|
static |
Definition at line 714 of file qwindowstheme.cpp.
Referenced by QWindowsFileIconEngine::filePixmap().