Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwindowstheme.cpp File Reference

(5868f8a1d4bcbba89c6323d6562d9cf509b5be0b)

#include <QtCore/qt_windows.h>
#include "qwindowstheme.h"
#include "qwindowsmenu.h"
#include "qwindowsdialoghelpers.h"
#include "qwindowscontext.h"
#include "qwindowsiconengine.h"
#include "qwindowsintegration.h"
#include "qwindowsscreen.h"
#include "qwindowswindow.h"
#include <commctrl.h>
#include <objbase.h>
#include <commoncontrols.h>
#include <shellapi.h>
#include <QtCore/qapplicationstatic.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/qqueue.h>
#include <QtCore/qmutex.h>
#include <QtCore/qwaitcondition.h>
#include <QtCore/qoperatingsystemversion.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/qwinregistry_p.h>
#include <QtCore/private/qfunctions_win_p.h>
#include <QtGui/private/qwindowsthemecache_p.h>
#include <algorithm>
Include dependency graph for qwindowstheme.cpp:

Go to the source code of this file.

Classes

class  QShGetFileInfoThread
struct  QShGetFileInfoThread::Task
class  FakePointer< T >
class  QWindowsFileIconEngine

Enumerations

enum  AccentColorLevel {
  AccentColorDarkest , AccentColorDarker , AccentColorDark , AccentColorNormal ,
  AccentColorLight , AccentColorLighter , AccentColorLightest , AccentColorDarkest ,
  AccentColorDarker , AccentColorDark , AccentColorNormal , AccentColorLight ,
  AccentColorLighter , AccentColorLightest
}
enum  FileIconSize {
  SmallFileIcon , LargeFileIcon , ExtraLargeFileIcon , JumboFileIcon ,
  FileIconSizeCount , SmallFileIcon , LargeFileIcon , ExtraLargeFileIcon ,
  JumboFileIcon , FileIconSizeCount
}
enum  { sHIL_EXTRALARGE = 0x2 , sHIL_JUMBO = 0x4 , sHIL_EXTRALARGE = 0x2 , sHIL_JUMBO = 0x4 }
enum  AccentColorLevel {
  AccentColorDarkest , AccentColorDarker , AccentColorDark , AccentColorNormal ,
  AccentColorLight , AccentColorLighter , AccentColorLightest , AccentColorDarkest ,
  AccentColorDarker , AccentColorDark , AccentColorNormal , AccentColorLight ,
  AccentColorLighter , AccentColorLightest
}
enum  FileIconSize {
  SmallFileIcon , LargeFileIcon , ExtraLargeFileIcon , JumboFileIcon ,
  FileIconSizeCount , SmallFileIcon , LargeFileIcon , ExtraLargeFileIcon ,
  JumboFileIcon , FileIconSizeCount
}
enum  { sHIL_EXTRALARGE = 0x2 , sHIL_JUMBO = 0x4 , 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 QColor qt_accentColor (AccentColorLevel level)
 Q_APPLICATION_STATIC (QShGetFileInfoThread, s_shGetFileInfoThread) static inline QPalette standardPalette()
static QColor placeHolderColor (QColor textColor)
static QPalette toolTipPalette (const QPalette &systemPalette, bool light, bool highContrastEnabled)
static QPalette menuPalette (const QPalette &systemPalette, bool light)
static QPalettemenuBarPalette (const QPalette &menuPalette, bool light)
LRESULT QT_WIN_CALLBACK qThemeChangeObserverWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
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, int iIcon)
static bool doUseNativeMenus ()

Variables

static int fileIconSizes [FileIconSizeCount]

Enumeration Type Documentation

◆ anonymous enum [1/2]

anonymous enum
Enumerator
sHIL_EXTRALARGE 
sHIL_JUMBO 
sHIL_EXTRALARGE 
sHIL_JUMBO 

Definition at line 1041 of file qwindowstheme.cpp.

◆ anonymous enum [2/2]

anonymous enum
Enumerator
sHIL_EXTRALARGE 
sHIL_JUMBO 
sHIL_EXTRALARGE 
sHIL_JUMBO 

Definition at line 1041 of file qwindowstheme.cpp.

◆ AccentColorLevel [1/2]

Enumerator
AccentColorDarkest 
AccentColorDarker 
AccentColorDark 
AccentColorNormal 
AccentColorLight 
AccentColorLighter 
AccentColorLightest 
AccentColorDarkest 
AccentColorDarker 
AccentColorDark 
AccentColorNormal 
AccentColorLight 
AccentColorLighter 
AccentColorLightest 

Definition at line 81 of file qwindowstheme.cpp.

◆ AccentColorLevel [2/2]

Enumerator
AccentColorDarkest 
AccentColorDarker 
AccentColorDark 
AccentColorNormal 
AccentColorLight 
AccentColorLighter 
AccentColorLightest 
AccentColorDarkest 
AccentColorDarker 
AccentColorDark 
AccentColorNormal 
AccentColorLight 
AccentColorLighter 
AccentColorLightest 

Definition at line 81 of file qwindowstheme.cpp.

◆ FileIconSize [1/2]

Enumerator
SmallFileIcon 
LargeFileIcon 
ExtraLargeFileIcon 
JumboFileIcon 
FileIconSizeCount 
SmallFileIcon 
LargeFileIcon 
ExtraLargeFileIcon 
JumboFileIcon 
FileIconSizeCount 

Definition at line 845 of file qwindowstheme.cpp.

◆ FileIconSize [2/2]

Enumerator
SmallFileIcon 
LargeFileIcon 
ExtraLargeFileIcon 
JumboFileIcon 
FileIconSizeCount 
SmallFileIcon 
LargeFileIcon 
ExtraLargeFileIcon 
JumboFileIcon 
FileIconSizeCount 

Definition at line 845 of file qwindowstheme.cpp.

Function Documentation

◆ booleanSystemParametersInfo()

bool booleanSystemParametersInfo ( UINT what,
bool defaultValue )
inlinestatic

Definition at line 58 of file qwindowstheme.cpp.

◆ dirIconPixmapCacheKey()

QString dirIconPixmapCacheKey ( int iIcon,
int iconSize,
int imageListSize )
static

Definition at line 1046 of file qwindowstheme.cpp.

References sHIL_EXTRALARGE, and sHIL_JUMBO.

◆ doUseNativeMenus()

bool doUseNativeMenus ( )
inlinestatic

Definition at line 1233 of file qwindowstheme.cpp.

References QWindowsIntegration::instance(), and QWindowsIntegration::options().

Referenced by QWindowsTheme::useNativeMenus().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dWordSystemParametersInfo()

DWORD dWordSystemParametersInfo ( UINT what,
DWORD defaultValue )
inlinestatic

Definition at line 66 of file qwindowstheme.cpp.

◆ getSysColor()

QColor getSysColor ( int index)
inlinestatic

Definition at line 98 of file qwindowstheme.cpp.

◆ iconThemeSearchPaths()

QStringList iconThemeSearchPaths ( )
inlinestatic

Definition at line 575 of file qwindowstheme.cpp.

◆ loadIconFromShell32()

QPixmap loadIconFromShell32 ( int resourceId,
QSizeF size )
static

Definition at line 890 of file qwindowstheme.cpp.

◆ menuBarPalette()

QPalette * menuBarPalette ( const QPalette & menuPalette,
bool light )
inlinestatic

Definition at line 490 of file qwindowstheme.cpp.

◆ menuPalette()

QPalette menuPalette ( const QPalette & systemPalette,
bool light )
inlinestatic

Definition at line 451 of file qwindowstheme.cpp.

◆ mixColors()

QColor mixColors ( const QColor & c1,
const QColor & c2 )
inlinestatic

Definition at line 74 of file qwindowstheme.cpp.

◆ operator<<()

QDebug operator<< ( QDebug d,
const NONCLIENTMETRICS & m )

Definition at line 790 of file qwindowstheme.cpp.

◆ pixmapFromShellImageList()

QPixmap pixmapFromShellImageList ( int iImageList,
int iIcon )
static

Definition at line 1084 of file qwindowstheme.cpp.

◆ placeHolderColor()

QColor placeHolderColor ( QColor textColor)
static

Definition at line 298 of file qwindowstheme.cpp.

◆ Q_APPLICATION_STATIC()

Q_APPLICATION_STATIC ( QShGetFileInfoThread ,
s_shGetFileInfoThread  )

Definition at line 279 of file qwindowstheme.cpp.

◆ qt_accentColor()

QColor qt_accentColor ( AccentColorLevel level)
inlinestaticnodiscard

◆ qt_pixmapFromWinHICON()

Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON ( HICON icon)

Definition at line 648 of file qpixmap_win.cpp.

◆ qThemeChangeObserverWndProc()

LRESULT QT_WIN_CALLBACK qThemeChangeObserverWndProc ( HWND hwnd,
UINT message,
WPARAM wParam,
LPARAM lParam )

Definition at line 507 of file qwindowstheme.cpp.

◆ styleNames()

QStringList styleNames ( )
inlinestatic

Definition at line 581 of file qwindowstheme.cpp.

◆ toolTipPalette()

QPalette toolTipPalette ( const QPalette & systemPalette,
bool light,
bool highContrastEnabled )
inlinestatic

Definition at line 420 of file qwindowstheme.cpp.

◆ uiEffects()

int uiEffects ( )
inlinestatic

Definition at line 589 of file qwindowstheme.cpp.

Referenced by QWindowsTheme::themeHint().

Here is the caller graph for this function:

Variable Documentation

◆ fileIconSizes

int fileIconSizes
static

Definition at line 871 of file qwindowstheme.cpp.

Referenced by QWindowsFileIconEngine::filePixmap().