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

(53234eb60a0fc0c996b8eafed0f22ac865121099)

#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 "qwindowswindowclassregistry.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)
static 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 1045 of file qwindowstheme.cpp.

◆ anonymous enum [2/2]

anonymous enum
Enumerator
sHIL_EXTRALARGE 
sHIL_JUMBO 
sHIL_EXTRALARGE 
sHIL_JUMBO 

Definition at line 1045 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 82 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 82 of file qwindowstheme.cpp.

◆ FileIconSize [1/2]

Enumerator
SmallFileIcon 
LargeFileIcon 
ExtraLargeFileIcon 
JumboFileIcon 
FileIconSizeCount 
SmallFileIcon 
LargeFileIcon 
ExtraLargeFileIcon 
JumboFileIcon 
FileIconSizeCount 

Definition at line 849 of file qwindowstheme.cpp.

◆ FileIconSize [2/2]

Enumerator
SmallFileIcon 
LargeFileIcon 
ExtraLargeFileIcon 
JumboFileIcon 
FileIconSizeCount 
SmallFileIcon 
LargeFileIcon 
ExtraLargeFileIcon 
JumboFileIcon 
FileIconSizeCount 

Definition at line 849 of file qwindowstheme.cpp.

Function Documentation

◆ booleanSystemParametersInfo()

bool booleanSystemParametersInfo ( UINT what,
bool defaultValue )
inlinestatic

Definition at line 59 of file qwindowstheme.cpp.

◆ dirIconPixmapCacheKey()

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

Definition at line 1050 of file qwindowstheme.cpp.

References sHIL_EXTRALARGE, and sHIL_JUMBO.

◆ doUseNativeMenus()

bool doUseNativeMenus ( )
inlinestatic

Definition at line 1237 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 67 of file qwindowstheme.cpp.

◆ getSysColor()

QColor getSysColor ( int index)
inlinestatic

Definition at line 99 of file qwindowstheme.cpp.

◆ iconThemeSearchPaths()

QStringList iconThemeSearchPaths ( )
inlinestatic

Definition at line 576 of file qwindowstheme.cpp.

◆ loadIconFromShell32()

QPixmap loadIconFromShell32 ( int resourceId,
QSizeF size )
static

Definition at line 894 of file qwindowstheme.cpp.

◆ menuBarPalette()

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

Definition at line 491 of file qwindowstheme.cpp.

◆ menuPalette()

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

Definition at line 452 of file qwindowstheme.cpp.

◆ mixColors()

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

Definition at line 75 of file qwindowstheme.cpp.

◆ operator<<()

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

Definition at line 794 of file qwindowstheme.cpp.

◆ pixmapFromShellImageList()

QPixmap pixmapFromShellImageList ( int iImageList,
int iIcon )
static

Definition at line 1088 of file qwindowstheme.cpp.

◆ placeHolderColor()

QColor placeHolderColor ( QColor textColor)
static

Definition at line 299 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 508 of file qwindowstheme.cpp.

◆ standardPalette()

QPalette standardPalette ( )
inlinestatic

Definition at line 283 of file qwindowstheme.cpp.

◆ styleNames()

QStringList styleNames ( )
inlinestatic

Definition at line 582 of file qwindowstheme.cpp.

◆ toolTipPalette()

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

Definition at line 421 of file qwindowstheme.cpp.

◆ uiEffects()

int uiEffects ( )
inlinestatic

Definition at line 590 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 875 of file qwindowstheme.cpp.

Referenced by QWindowsFileIconEngine::filePixmap().