7#include <private/qobject_p.h>
8#include <private/qpaintengine_raster_p.h>
9#include <qpa/qplatformnativeinterface.h>
14#include <qpa/qplatformnativeinterface.h>
34 L
"BUTTON", L
"COMBOBOX", L
"EDIT", L
"HEADER", L
"LISTVIEW",
35 L
"MENU", L
"PROGRESS", L
"REBAR", L
"SCROLLBAR", L
"SPIN",
36 L
"TAB", L
"TASKDIALOG", L
"TOOLBAR", L
"TOOLTIP", L
"TRACKBAR",
37 L
"TREEVIEW", L
"WINDOW", L
"STATUS", L
"TREEVIEW"
85HWND QWindowsXPStylePrivate::m_vistaTreeViewHelper =
nullptr;
86HTHEME QWindowsXPStylePrivate::m_themes[NThemes];
87bool QWindowsXPStylePrivate::use_xp =
false;
92 HRGN rgn = CreateRectRgn(
r.left(),
r.top(),
r.x() +
r.width(),
r.y() +
r.height());
94 HRGN dest = CreateRectRgn(0,0,0,0);
95 int result = CombineRgn(dest, winRegion, rgn, RGN_OR);
97 DeleteObject(winRegion);
106 HRGN hRegion = CreateRectRgn(0,0,0,0);
134 if (
ref.ref() && !force)
140 std::fill(m_themes, m_themes +
NThemes,
nullptr);
149 if (bufferDC && nullBitmap)
150 SelectObject(bufferDC, nullBitmap);
151 DeleteObject(bufferBitmap);
152 bufferBitmap =
nullptr;
159 if (
ref.deref() && !force)
181 void *hwnd =
nullptr;
182 void *wndProc =
reinterpret_cast<void *
>(DefWindowProc);
187 Q_ARG(
void*, wndProc)) && hwnd) {
188 return reinterpret_cast<HWND
>(hwnd);
194bool QWindowsXPStylePrivate::initVistaTreeViewTheming()
196 if (m_vistaTreeViewHelper)
200 if (!m_vistaTreeViewHelper) {
201 qWarning(
"Unable to create the treeview helper window.");
204 if (FAILED(SetWindowTheme(m_vistaTreeViewHelper, L
"explorer",
nullptr))) {
206 cleanupVistaTreeViewTheming();
212void QWindowsXPStylePrivate::cleanupVistaTreeViewTheming()
214 if (m_vistaTreeViewHelper) {
215 DestroyWindow(m_vistaTreeViewHelper);
216 m_vistaTreeViewHelper =
nullptr;
227 for (
auto &theme : m_themes) {
229 CloseThemeData(theme);
233 QWindowsXPStylePrivate::cleanupVistaTreeViewTheming();
239 qWarning(
"Invalid parameters #%d, %p", theme, hwnd);
242 if (!m_themes[theme]) {
244 if (theme ==
VistaTreeViewTheme && QWindowsXPStylePrivate::initVistaTreeViewTheming())
245 hwnd = QWindowsXPStylePrivate::m_vistaTreeViewHelper;
246 m_themes[theme] = OpenThemeData(hwnd,
name);
251 return m_themes[theme];
256 return theme >= 0 && theme <
NThemes ?
303 if (
const HWND hwnd =
reinterpret_cast<HWND
>(
window->winId()))
310 return reinterpret_cast<HWND
>(
window->winId());
313 return GetDesktopWindow();
325 if (bufferW >=
w && bufferH >=
h)
328 if (bufferDC && nullBitmap)
329 SelectObject(bufferDC, nullBitmap);
330 DeleteObject(bufferBitmap);
331 bufferBitmap =
nullptr;
338 HDC displayDC = GetDC(
nullptr);
339 bufferDC = CreateCompatibleDC(displayDC);
340 ReleaseDC(
nullptr, displayDC);
345 memset(&bmi, 0,
sizeof(bmi));
346 bmi.bmiHeader.biSize =
sizeof(BITMAPINFOHEADER);
347 bmi.bmiHeader.biWidth =
w;
348 bmi.bmiHeader.biHeight = -
h;
349 bmi.bmiHeader.biPlanes = 1;
350 bmi.bmiHeader.biBitCount = 32;
351 bmi.bmiHeader.biCompression = BI_RGB;
354 bufferPixels =
nullptr;
355 bufferBitmap = CreateDIBSection(bufferDC, &bmi, DIB_RGB_COLORS,
reinterpret_cast<void **
>(&bufferPixels),
nullptr, 0);
357 nullBitmap =
static_cast<HBITMAP
>(SelectObject(bufferDC, bufferBitmap));
360 qErrnoWarning(
"QWindowsXPStylePrivate::buffer(%dx%d), CreateDIBSection() failed.",
w,
h);
366 qErrnoWarning(
"QWindowsXPStylePrivate::buffer(%dx%d), CreateDIBSection() did not allocate pixel data.",
w,
h);
374 qDebug(
"Creating new dib section (%d, %d)",
w,
h);
387 return IsThemeBackgroundPartiallyTransparent(themeData.
handle(), themeData.
partId,
405 HRGN dest = CreateRectRgn(0, 0, 0, 0);
406 const bool success = CombineRgn(dest, hRgn,
nullptr, RGN_COPY) !=
ERROR;
411 const auto numBytes = GetRegionData(dest, 0,
nullptr);
415 char *
buf =
new (std::nothrow)
char[numBytes];
419 RGNDATA *
rd =
reinterpret_cast<RGNDATA*
>(
buf);
420 if (GetRegionData(dest, numBytes,
rd) == 0) {
425 RECT *
r =
reinterpret_cast<RECT*
>(
rd->Buffer);
426 for (
uint i = 0;
i <
rd->rdh.nCount; ++
i) {
428 rect.setCoords(
int(
r->left * factor), int(
r->top * factor), int((
r->right - 1) * factor), int((
r->bottom - 1) * factor));
448 const int startX =
rect.left();
449 const int startY =
rect.top();
450 const int w =
rect.width();
451 const int h =
rect.height();
454 for (
int y = startY;
y <
h/2; ++
y) {
455 auto buffer =
reinterpret_cast<const DWORD *
>(bufferPixels) + (
y * bufferW);
457 int alpha = (*buffer) >> 24;
458 if (firstAlpha == -1)
460 else if (
alpha != firstAlpha)
477 const int startX =
rect.left();
478 const int startY =
rect.top();
479 const int w =
rect.width();
480 const int h =
rect.height();
481 bool hasFixedAlphaValue =
false;
483 for (
int y = startY;
y <
h; ++
y) {
484 auto buffer =
reinterpret_cast<DWORD *
>(bufferPixels) + (
y * bufferW);
490 hasFixedAlphaValue =
true;
494 return hasFixedAlphaValue;
508 const int startX =
rect.left();
509 const int startY =
rect.top();
510 const int w =
rect.width();
511 const int h =
rect.height();
512 bool valueChange =
false;
515 for (
int y = startY;
y <
h; ++
y) {
516 auto buffer =
reinterpret_cast<DWORD *
>(bufferPixels) + (
y * bufferW);
522 unsigned int alphaValue = (*buffer) & 0xFF000000;
523 if (alphaValue == 0xFF000000) {
526 }
else if (alphaValue == 0) {
551static inline bool isFullyOpaque(
const XPThemeData &themeData)
574 Q_ASSERT_X(
painter !=
nullptr,
"QWindowsXPStylePrivate::drawBackground()",
"Trying to draw a theme part without a painter");
585 const qreal additionalDevicePixelRatio = themeData.
window ? themeData.
window->devicePixelRatio() :
qreal(1);
627 ?
QRectF(
r.topLeft() * factor,
r.size() * factor)
662 SelectClipRgn(dc, hrgn);
665 printf(
"---[ DIRECT PAINTING ]------------------> Name(%-10s) Part(%d) State(%d)\n",
667 showProperties(themeData);
671 DTBGOPTS drawOptions;
672 memset(&drawOptions, 0,
sizeof(drawOptions));
673 drawOptions.dwSize =
sizeof(drawOptions);
675 drawOptions.dwFlags = DTBG_CLIPRECT
676 | (themeData.
noBorder ? DTBG_OMITBORDER : 0)
677 | (themeData.
noContent ? DTBG_OMITCONTENT : 0)
681 SelectClipRgn(dc,
nullptr);
699 qreal additionalDevicePixelRatio,
700 qreal correctionFactor)
705 if ((themeData.
rotate + 90) % 180 == 0) {
712 QRect drawRect = hasCorrectionFactor
714 int partId = themeData.
partId;
715 int stateId = themeData.
stateId;
716 int w =
rect.width();
717 int h =
rect.height();
721 bool stateHasData =
true;
723 bool partIsTransparent;
724 bool potentialInvalidAlpha;
742 if (hasCorrectionFactor) {
751 bool haveCachedPixmap =
false;
754 partIsTransparent =
data.partIsTransparent;
756 alphaType =
data.alphaType;
757 potentialInvalidAlpha =
data.hadInvalidAlpha;
763 ::sprintf(
buf,
"+ Pixmap(%3d, %3d) ]",
w,
h);
764 printf(
"---[ CACHED %s--------> Name(%-10s) Part(%d) State(%d)\n",
765 haveCachedPixmap ?
buf :
"]-------------------",
770 BOOL tmt_borderonly =
false;
771 COLORREF tmt_transparentcolor = 0x0;
772 PROPERTYORIGIN proporigin = PO_NOTFOUND;
773 GetThemeBool(themeData.
handle(), themeData.
partId, themeData.
stateId, TMT_BORDERONLY, &tmt_borderonly);
774 GetThemeColor(themeData.
handle(), themeData.
partId, themeData.
stateId, TMT_TRANSPARENTCOLOR, &tmt_transparentcolor);
775 GetThemePropertyOrigin(themeData.
handle(), themeData.
partId, themeData.
stateId, TMT_CAPTIONMARGINS, &proporigin);
779 potentialInvalidAlpha =
false;
780 GetThemePropertyOrigin(themeData.
handle(), themeData.
partId, themeData.
stateId, TMT_GLYPHTYPE, &proporigin);
781 if (proporigin == PO_PART || proporigin == PO_STATE) {
782 int tmt_glyphtype = GT_NONE;
783 GetThemeEnumValue(themeData.
handle(), themeData.
partId, themeData.
stateId, TMT_GLYPHTYPE, &tmt_glyphtype);
784 potentialInvalidAlpha = partIsTransparent && tmt_glyphtype == GT_IMAGEGLYPH;
788 printf(
"---[ NOT CACHED ]-----------------------> Name(%-10s) Part(%d) State(%d)\n",
790 printf(
"-->partIsTransparen = %d\n", partIsTransparent);
791 printf(
"-->potentialInvalidAlpha = %d\n", potentialInvalidAlpha);
792 showProperties(themeData);
795 bool wasAlphaSwapped =
false;
796 bool wasAlphaFixed =
false;
802 bool addBorderContentClipping =
false;
812 PROPERTYORIGIN origin = PO_NOTFOUND;
813 GetThemePropertyOrigin(themeData.
handle(), themeData.
partId, themeData.
stateId, TMT_BORDERSIZE, &origin);
814 GetThemeInt(themeData.
handle(), themeData.
partId, themeData.
stateId, TMT_BORDERSIZE, &borderSize);
815 borderSize *= additionalDevicePixelRatio;
818 if ((origin == PO_CLASS || origin == PO_PART || origin == PO_STATE) && borderSize > 0) {
821 area =
area.adjusted(-borderSize, -borderSize, borderSize, borderSize);
826 QRegion content =
area.adjusted(borderSize, borderSize, -borderSize, -borderSize);
827 extraClip ^= content;
834 if (!haveCachedPixmap) {
842 memset(bufferPixels, 0x00, bufferW * drawRect.
height() * 4);
846 int dx =
area.x() - drawRect.
x();
847 int dy =
area.y() - drawRect.
y();
852 DTBGOPTS drawOptions;
853 drawOptions.dwSize =
sizeof(drawOptions);
855 drawOptions.dwFlags = DTBG_CLIPRECT
856 | (themeData.
noBorder ? DTBG_OMITBORDER : 0)
857 | (themeData.
noContent ? DTBG_OMITCONTENT : 0);
861 DrawThemeBackgroundEx(themeData.
handle(), dc, themeData.
partId, themeData.
stateId, &wRect, &drawOptions);
868 memset(
static_cast<void *
>(&
data), 0,
sizeof(
data));
869 data.dataValid =
true;
875 potentialInvalidAlpha =
true;
876#if defined(DEBUG_XP_STYLE) && 1
877 dumpNativeDIB(drawRect.
width(), drawRect.
height());
882 if (potentialInvalidAlpha)
886 if ((partIsTransparent && !wasAlphaSwapped) || (!partIsTransparent &&
hasAlpha)) {
889 }
else if (wasAlphaSwapped) {
901#if defined(DEBUG_XP_STYLE) && 1
902 printf(
"Image format is: %s\n", alphaType ==
RealAlpha ?
"Real Alpha" : alphaType ==
MaskAlpha ?
"Masked Alpha" :
"No Alpha");
905 if (hasCorrectionFactor)
907 img.setDevicePixelRatio(additionalDevicePixelRatio);
911 bool useRegion = partIsTransparent && !
hasAlpha && !wasAlphaSwapped;
916 newRegion =
region(themeData);
919#if defined(DEBUG_XP_STYLE) && 0
920 printf(
"Using region:\n");
921 for (
const QRect &
r : newRegion)
922 printf(
" (%d, %d, %d, %d)\n",
r.x(),
r.y(),
r.right(),
r.bottom());
926 if (addBorderContentClipping)
930 if (!haveCachedPixmap)
941 if (!haveCachedPixmap)
944 imgCopy = cachedPixmap.
toImage();
958 if (useRegion || addBorderContentClipping) {
966 if (!haveCachedPixmap &&
w &&
h) {
970 printf(
"+++Adding pixmap to cache, size(%d, %d), wasAlphaSwapped(%d), wasAlphaFixed(%d), name(%s)\n",
971 w,
h, wasAlphaSwapped, wasAlphaFixed,
qPrintable(pixmapCacheKey));
977 memset(
static_cast<void *
>(&
data), 0,
sizeof(
data));
978 data.dataValid =
true;
979 data.partIsTransparent = partIsTransparent;
980 data.alphaType = alphaType;
982 data.wasAlphaSwapped = wasAlphaSwapped;
983 data.hadInvalidAlpha = wasAlphaFixed;
1038 return rect.translated(0, 1);
1042 if (qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(
option))
1046 if (
const QTabWidget *tabWidget = qobject_cast<const QTabWidget *>(
widget)) {
1047 if (tabWidget->documentMode())
1051 rect.adjust(0, 0, -2, -2);
1058 qstyleoption_cast<const QStyleOptionTabWidgetFrame *>(
option);
1068 rect.adjust(-overlap + borderThickness, 0, -overlap + borderThickness, 0);
1077 HTHEME theme = buttontheme.
handle();
1081 stateId = PBS_DISABLED;
1083 stateId = PBS_PRESSED;
1087 stateId = PBS_DEFAULTED;
1089 stateId = PBS_NORMAL;
1094 if (SUCCEEDED(GetThemeMargins(theme,
nullptr, BP_PUSHBUTTON, stateId,
TMT_CONTENTMARGINS,
nullptr, &borderSize))) {
1095 rect.adjust(borderSize.cxLeftWidth, borderSize.cyTopHeight,
1096 -borderSize.cxRightWidth, -borderSize.cyBottomHeight);
1106 rect.adjust(4, 3, -4, -3);
1108 rect.adjust(3, 2, -3, -2);
1128 int themeNumber = -1;
1133 bool hMirrored =
false;
1134 bool vMirrored =
false;
1135 bool noBorder =
false;
1136 bool noContent =
false;
1143 = qstyleoption_cast<const QStyleOptionTabBarBase *>(
option)) {
1145 switch (tbb->shape) {
1147 p->setPen(
QPen(tbb->palette.dark(), 0));
1148 p->drawLine(tbb->rect.topLeft(), tbb->rect.topRight());
1151 p->setPen(
QPen(tbb->palette.dark(), 0));
1152 p->drawLine(tbb->rect.left(), tbb->rect.top(), tbb->rect.left(), tbb->rect.bottom());
1155 p->setPen(
QPen(tbb->palette.dark(), 0));
1156 p->drawLine(tbb->rect.left(), tbb->rect.top(),
1157 tbb->rect.right(), tbb->rect.top());
1160 p->setPen(
QPen(tbb->palette.dark(), 0));
1161 p->drawLine(tbb->rect.topLeft(), tbb->rect.bottomLeft());
1177 partId = BP_PUSHBUTTON;
1179 stateId = PBS_DISABLED;
1181 stateId = PBS_PRESSED;
1187 stateId = PBS_NORMAL;
1199 stateId = TS_DISABLED;
1201 stateId = TS_PRESSED;
1205 stateId = TS_CHECKED;
1209 stateId = TS_NORMAL;
1214 partId = TP_SPLITBUTTONDROPDOWN;
1216 stateId = TS_DISABLED;
1218 stateId = TS_PRESSED;
1222 stateId = TS_CHECKED;
1226 stateId = TS_NORMAL;
1233 partId = BP_CHECKBOX;
1235 stateId = CBS_UNCHECKEDDISABLED;
1237 stateId = CBS_UNCHECKEDPRESSED;
1239 stateId = CBS_UNCHECKEDHOT;
1241 stateId = CBS_UNCHECKEDNORMAL;
1244 stateId += CBS_CHECKEDNORMAL-1;
1246 stateId += CBS_MIXEDNORMAL-1;
1252 partId = BP_RADIOBUTTON;
1254 stateId = RBS_UNCHECKEDDISABLED;
1256 stateId = RBS_UNCHECKEDPRESSED;
1258 stateId = RBS_UNCHECKEDHOT;
1260 stateId = RBS_UNCHECKEDNORMAL;
1263 stateId += RBS_CHECKEDNORMAL-1;
1274 partId = LVP_LISTGROUP;
1278 stateId = ETS_DISABLED;
1280 stateId = ETS_NORMAL;
1282 if (GetThemeEnumValue(theme.
handle(), partId, stateId, TMT_BGTYPE, &fillType) == S_OK) {
1283 if (fillType == BT_BORDERFILL) {
1285 GetThemeColor(theme.
handle(), partId, stateId, TMT_BORDERCOLOR, &bcRef);
1286 QColor bordercolor(
qRgb(GetRValue(bcRef), GetGValue(bcRef), GetBValue(bcRef)));
1287 QPen oldPen =
p->pen();
1292 p->setPen(
QPen(
option->palette.base().color(), 0));
1297 bottomRightAdjustment, bottomRightAdjustment));
1299 p->setPen(
QPen(bordercolor, 0));
1304 if (fillType == BT_NONE)
1324 if (qstyleoption_cast<const QStyleOptionFrame *>(
option)) {
1326 partId = EP_EDITTEXT;
1329 stateId = ETS_DISABLED;
1331 stateId = ETS_NORMAL;
1339 partId = EP_EDITTEXT;
1343 stateId = isEnabled ? ETS_NORMAL : ETS_DISABLED;
1354 GetThemeEnumValue(theme.
handle(), partId, stateId, TMT_BGTYPE, &bgType);
1355 if ( bgType == BT_IMAGEFILE ) {
1361 d->drawBackground(theme);
1366 PROPERTYORIGIN origin = PO_NOTFOUND;
1367 GetThemePropertyOrigin(theme.
handle(), theme.
partId, theme.
stateId, TMT_FILLCOLOR, &origin);
1369 if ((origin == PO_PART || origin == PO_STATE)) {
1371 GetThemeColor(theme.
handle(), partId, stateId, TMT_FILLCOLOR, &bgRef);
1372 fillColor =
QBrush(
qRgb(GetRValue(bgRef), GetGValue(bgRef), GetBValue(bgRef)));
1375 p->fillRect(
option->rect, fillColor);
1379 if (
panel->lineWidth > 0)
1392 bool useGradient =
true;
1393 const int maxlength = 256;
1394 wchar_t themeFileName[maxlength];
1395 wchar_t themeColor[maxlength];
1397 if (GetCurrentThemeName(themeFileName, maxlength, themeColor, maxlength,
nullptr, 0) == S_OK) {
1398 wchar_t *
offset =
nullptr;
1401 if (!lstrcmp(
offset, L
"Luna.msstyles") && !lstrcmp(
offset, L
"Metallic")) {
1402 useGradient =
false;
1414 reg -= contentsRect;
1415 p->setClipRegion(reg);
1419 d->drawBackground(theme);
1420 p->setClipRect(contentsRect);
1424 switch (tab->shape) {
1449 p->setPen(
option->palette.dark().color());
1450 p->drawRect(
rect.adjusted(0, 0, -1, -1));
1462 stateId = FS_ACTIVE;
1464 stateId = FS_INACTIVE;
1471 theme.
rect =
QRect(frm->rect.x(), frm->rect.y(), frm->rect.x()+fwidth, frm->rect.height()-fwidth); theme.
partId = WP_SMALLFRAMELEFT;
1472 d->drawBackground(theme);
1473 theme.
rect =
QRect(frm->rect.width()-fwidth, frm->rect.y(), fwidth, frm->rect.height()-fwidth);
1474 theme.
partId = WP_SMALLFRAMERIGHT;
1475 d->drawBackground(theme);
1476 theme.
rect =
QRect(frm->rect.x(), frm->rect.bottom()-fwidth+1, frm->rect.width(), fwidth);
1477 theme.
partId = WP_SMALLFRAMEBOTTOM;
1478 d->drawBackground(theme);
1487 partId = HP_HEADERSORTARROW;
1488 if (
flags & State_Down)
1489 stateId = HSAS_SORTEDDOWN;
1491 stateId = HSAS_SORTEDUP;
1495 p->setPen(
option->palette.dark().color());
1496 p->translate(0,
option->rect.height()/2 - 4);
1524 partId = BP_GROUPBOX;
1526 stateId = GBS_DISABLED;
1528 stateId = GBS_NORMAL;
1544 bool inverted =
false;
1547 inverted = pb->invertedAppearance;
1555 partId = PP_CHUNKVERT;
1568 stateId = FS_ACTIVE;
1570 stateId = FS_INACTIVE;
1580 theme.
partId = WP_FRAMELEFT;
1581 if (!
d->drawBackground(theme)) {
1586 theme.
partId = WP_FRAMERIGHT;
1587 if (!
d->drawBackground(theme)) {
1592 theme.
partId = WP_FRAMEBOTTOM;
1593 if (!
d->drawBackground(theme)) {
1598 theme.
partId = WP_CAPTION;
1599 if (!
d->drawBackground(theme))
1607 static const int decoration_size = 9;
1608 int mid_h =
option->rect.x() +
option->rect.width() / 2;
1609 int mid_v =
option->rect.y() +
option->rect.height() / 2;
1619 p->fillRect(aft_h, mid_v,
option->rect.right() - aft_h + 1, 1,
brush);
1622 p->fillRect(mid_h, aft_v, 1,
option->rect.bottom() - aft_v + 1,
brush);
1626 int delta = decoration_size / 2;
1632 theme.
rect =
QRect(bef_h, bef_v, decoration_size, decoration_size);
1633 theme.
partId = TVP_GLYPH;
1635 d->drawBackground(theme);
1641 if (
option->rect.height() < 3) {
1648 partId = TP_SEPARATOR;
1651 partId = TP_SEPARATOR;
1653 partId = TP_SEPARATORVERT;
1660 partId = RP_GRIPPER;
1662 partId = RP_GRIPPER;
1663 rect.adjust(0, 0, -2, 0);
1666 partId = RP_GRIPPERVERT;
1667 rect.adjust(0, 0, 0, -2);
1673 button.QStyleOption::operator=(*option);
1674 button.state &= ~State_MouseOver;
1693 d->drawBackground(theme);
1711 bool hMirrored =
false;
1712 bool vMirrored =
false;
1714 int themeNumber = -1;
1721 partId = SP_GRIPPER;
1726 switch (sg->corner) {
1740 hMirrored = vMirrored =
true;
1748 partId = HP_HEADERITEM;
1750 stateId = HIS_PRESSED;
1754 stateId = HIS_NORMAL;
1765 partId = BP_PUSHBUTTON;
1771 stateId = PBS_DISABLED;
1775 stateId = PBS_PRESSED;
1779 stateId = PBS_DEFAULTED;
1781 stateId = PBS_NORMAL;
1785 d->drawBackground(theme);
1789 int mbiw = 0, mbih = 0;
1792 TP_SPLITBUTTONDROPDOWN);
1796 mbih =
size.height();
1810 stateId = tab->state &
State_Enabled ? TIS_NORMAL : TIS_DISABLED;
1831 stateId = TIS_DISABLED;
1833 stateId = TIS_SELECTED;
1835 stateId = TIS_FOCUSED;
1839 stateId = TIS_NORMAL;
1842 if (firstTab || onlyOne) {
1844 partId = TABP_TABITEMLEFTEDGE;
1845 }
else if (centerAligned) {
1846 partId = TABP_TABITEM;
1848 partId = TABP_TABITEMRIGHTEDGE;
1851 partId = TABP_TABITEM;
1857 bool temp = firstTab;
1861 bool begin = firstTab || onlyOne;
1862 bool end = lastTab || onlyOne;
1863 switch (tab->shape) {
1866 rect.adjust(
begin ? 0 : -tabOverlap, 0,
end ? 0 : tabOverlap, borderThickness);
1868 rect.adjust(
begin? tabOverlap : 0, tabOverlap,
end ? -tabOverlap : 0, 0);
1874 rect.adjust(
begin ? 0 : -tabOverlap , -borderThickness,
end ? 0 : tabOverlap, 0);
1876 rect.adjust(
begin ? tabOverlap : 0, 0,
end ? -tabOverlap : 0 , -tabOverlap);
1881 rect.adjust(-borderThickness,
begin ? 0 : -tabOverlap, 0,
end ? 0 : tabOverlap);
1883 rect.adjust(0,
begin ? tabOverlap : 0, -tabOverlap,
end ? -tabOverlap : 0);
1890 rect.adjust(0,
begin ? 0 : -tabOverlap, borderThickness,
end ? 0 : tabOverlap);
1892 rect.adjust(tabOverlap,
begin ? tabOverlap : 0, 0,
end ? -tabOverlap : 0);
1901 switch (tab->shape) {
1903 rect.adjust(0,0, 0,-1);
1906 rect.adjust(0,1, 0,0);
1909 rect.adjust( 1,0, 0,0);
1912 rect.adjust(0,0, -1,0);
1936 int tab = menuitem->tabWidth;
1939 bool checkable = menuitem->menuHasCheckableItems;
1940 bool checked = checkable ? menuitem->checked :
false;
1943 int checkcol =
qMax(menuitem->maxIconWidth, 12);
1956 int yoff =
y-1 +
h / 2;
1957 p->setPen(menuitem->palette.dark().color());
1958 p->drawLine(
x, yoff,
x+
w, yoff);
1960 p->setPen(menuitem->palette.light().color());
1961 p->drawLine(
x, yoff,
x+
w, yoff);
1968 if (!menuitem->icon.isNull()) {
1975 const int pixw =
pixmap.width() /
pixmap.devicePixelRatio();
1976 const int pixh =
pixmap.height() /
pixmap.devicePixelRatio();
1977 QRect iconRect(0, 0, pixw, pixh);
1980 p->setPen(menuitem->palette.text().color());
1983 p->drawRect(vIconRect.
adjusted(-1, -1, 0, 0));
1987 }
else if (checked) {
2003 QColor textColor = dis ? menuitem->palette.text().color() :
2004 act ? menuitem->palette.highlightedText().color() : menuitem->palette.buttonText().color();
2005 p->setPen(textColor);
2009 xpos = menuitem->rect.x() + xm;
2023 p->setPen(menuitem->palette.light().color());
2024 p->drawText(vShortcutRect.
adjusted(1,1,1,1), text_flags,
s.mid(
t + 1));
2025 p->setPen(textColor);
2027 p->drawText(vShortcutRect, text_flags,
s.mid(
t + 1));
2035 p->setPen(menuitem->palette.light().color());
2037 p->setPen(textColor);
2039 p->drawText(vTextRect, text_flags,
s);
2045 int dim = (
h - 2) / 2;
2051 newMI.
rect = vSubMenuRect;
2085#if 0 && QT_CONFIG(dockwidget)
2089 int buttonMargin = 4;
2092 bool isFloating =
false;
2095 const bool verticalTitleBar = dwOpt->verticalTitleBar;
2097 if (verticalTitleBar) {
2102 p->translate(-
rect.left() + 1, -
rect.top());
2107 if (dwOpt->closable) {
2109 titleRect.
adjust(0, 0, -sz.
width() - mw - buttonMargin, 0);
2112 if (dwOpt->floatable) {
2114 titleRect.
adjust(0, 0, -sz.
width() - mw - buttonMargin, 0);
2118 titleRect.
adjust(0, -fw, 0, 0);
2122 titleRect.
adjust(mw, 0, 0, 0);
2123 if (!dwOpt->floatable && !dwOpt->closable)
2124 titleRect.
adjust(0, 0, -mw, 0);
2127 if (!verticalTitleBar)
2128 titleRect =
visualRect(dwOpt->direction,
r, titleRect);
2131 QPen oldPen =
p->pen();
2147 stateId = CS_ACTIVE;
2149 stateId = CS_INACTIVE;
2151 int titleHeight =
rect.height() - 2;
2152 rect =
rect.adjusted(-fw, -fw, fw, 0);
2160 theme.
partId = WP_SMALLCAPTION;
2161 d->drawBackground(theme);
2170 p->drawPixmap(
rect.width() - titleHeight - pxIco.
width(),
rect.bottom() - titleHeight - 2, pxIco);
2172 p->drawPixmap(fw,
rect.bottom() - titleHeight - 2, pxIco);
2174 if (!dwOpt->title.isEmpty()) {
2175 QPen oldPen =
p->pen();
2176 QFont oldFont =
p->font();
2177 QFont titleFont = oldFont;
2179 p->setFont(titleFont);
2184 GetThemeEnumValue(theme.
handle(), WP_SMALLCAPTION,
isActive ? CS_ACTIVE : CS_INACTIVE, TMT_TEXTSHADOWTYPE, &
result);
2186 COLORREF textShadowRef;
2188 QColor textShadow =
qRgb(GetRValue(textShadowRef), GetGValue(textShadowRef), GetBValue(textShadowRef));
2189 p->setPen(textShadow);
2195 COLORREF captionText = GetSysColor(
isActive ? COLOR_CAPTIONTEXT : COLOR_INACTIVECAPTIONTEXT);
2196 QColor textColor =
qRgb(GetRValue(captionText), GetGValue(captionText), GetBValue(captionText));
2197 p->setPen(textColor);
2201 p->setFont(oldFont);
2211#if 0 && QT_CONFIG(rubberband)
2213 if (qstyleoption_cast<const QStyleOptionRubberBand *>(
option)) {
2216 p->setPen(highlight.
darker(120));
2219 qMin(highlight.
blue()/2 + 110, 255),
2222 p->setBrush(dimHighlight);
2223 p->drawRect(
option->rect.adjusted(0, 0, -1, -1));
2233 stateId = HIS_NORMAL;
2253 d->drawBackground(theme);
2262 theme->
partId = horizontal ? SBP_GRIPPERHORZ : SBP_GRIPPERVERT;
2267 const bool sufficientSpace = (horizontal && hSpace > (contentsMargin.
left() + contentsMargin.
right()))
2268 || vSpace > contentsMargin.
top() + contentsMargin.
bottom();
2272#if 0 && QT_CONFIG(mdiarea)
2275static void populateMdiButtonTheme(
const QStyle *
proxy,
2295qreal mdiButtonCorrectionFactor(XPThemeData &theme,
const QPaintDevice *pd =
nullptr)
2297 const auto dpr = pd ? pd->devicePixelRatioF() :
qApp->devicePixelRatio();
2299 const QSizeF requestedSize(theme.rect.size());
2300 const auto rawFactor =
qMin(requestedSize.width() / nativeSize.
width(),
2301 requestedSize.height() / nativeSize.
height());
2310 bool isTitleBarActive,
int part,
2316 theme->
stateId = RBS_DISABLED;
2321 else if (!isTitleBarActive)
2357 partId = EP_EDITTEXT;
2359 stateId = ETS_DISABLED;
2361 stateId = ETS_FOCUSED;
2363 stateId = ETS_NORMAL;
2366 partId, stateId,
r);
2368 d->drawBackground(ftheme);
2374 stateId = UPS_DISABLED;
2376 stateId = UPS_PRESSED;
2380 stateId = UPS_NORMAL;
2383 d->drawBackground(theme);
2389 stateId = DNS_DISABLED;
2391 stateId = DNS_PRESSED;
2395 stateId = DNS_NORMAL;
2398 d->drawBackground(theme);
2407 if (cmb->editable) {
2409 partId = EP_EDITBORDER_NOSCROLL;
2411 stateId = ETS_DISABLED;
2415 stateId = ETS_FOCUSED;
2417 stateId = ETS_NORMAL;
2421 partId, stateId,
r);
2423 d->drawBackground(theme);
2428 theme.
rect = subRect;
2432 stateId = CBXS_DISABLED;
2434 stateId = CBXS_PRESSED;
2438 stateId = CBXS_NORMAL;
2442 d->drawBackground(theme);
2449 theme.
partId = CP_READONLY;
2451 theme.
stateId = CBXS_DISABLED;
2458 d->drawBackground(theme);
2465 theme.
stateId = CBXS_DISABLED;
2468 d->drawBackground(theme);
2472 fropt.QStyleOption::operator=(*cmb);
2484 bool maxedOut = (scrollbar->maximum == scrollbar->minimum);
2486 flags &= ~State_Enabled;
2492 partId = SBP_ARROWBTN;
2494 stateId = (isHorz ? (isRTL ? ABS_LEFTDISABLED : ABS_RIGHTDISABLED) : ABS_DOWNDISABLED);
2496 stateId = (isHorz ? (isRTL ? ABS_LEFTPRESSED : ABS_RIGHTPRESSED) : ABS_DOWNPRESSED);
2498 stateId = (isHorz ? (isRTL ? ABS_LEFTHOT : ABS_RIGHTHOT) : ABS_DOWNHOT);
2500 stateId = (isHorz ? (isRTL ? ABS_LEFTNORMAL : ABS_RIGHTNORMAL) : ABS_DOWNNORMAL);
2503 d->drawBackground(theme);
2507 partId = SBP_ARROWBTN;
2509 stateId = (isHorz ? (isRTL ? ABS_RIGHTDISABLED : ABS_LEFTDISABLED) : ABS_UPDISABLED);
2511 stateId = (isHorz ? (isRTL ? ABS_RIGHTPRESSED : ABS_LEFTPRESSED) : ABS_UPPRESSED);
2513 stateId = (isHorz ? (isRTL ? ABS_RIGHTHOT : ABS_LEFTHOT) : ABS_UPHOT);
2515 stateId = (isHorz ? (isRTL ? ABS_RIGHTNORMAL : ABS_LEFTNORMAL) : ABS_UPNORMAL);
2518 d->drawBackground(theme);
2525 partId = scrollbar->orientation ==
Qt::Horizontal ? SBP_LOWERTRACKHORZ : SBP_LOWERTRACKVERT;
2526 stateId = SCRBS_DISABLED;
2529 d->drawBackground(theme);
2536 stateId = SCRBS_DISABLED;
2538 stateId = SCRBS_PRESSED;
2540 stateId = SCRBS_HOT;
2542 stateId = SCRBS_NORMAL;
2545 d->drawBackground(theme);
2551 stateId = SCRBS_DISABLED;
2553 stateId = SCRBS_PRESSED;
2555 stateId = SCRBS_HOT;
2557 stateId = SCRBS_NORMAL;
2560 d->drawBackground(theme);
2569 QSize extend(extentForButton, 0);
2574 rect.setSize(
rect.size() + 2 * extend);
2580 stateId = SCRBS_DISABLED;
2582 stateId = SCRBS_PRESSED;
2584 stateId = SCRBS_HOT;
2586 stateId = SCRBS_NORMAL;
2591 d->drawBackground(theme);
2595 if (!gripperBounds.
isEmpty()) {
2597 theme.
rect = gripperBounds;
2598 p->setClipRegion(
d->region(theme));
2599 d->drawBackground(theme);
2612 QRect slrect = slider->rect;
2618 stateId = TRS_NORMAL;
2621 partId = TKP_TRACKVERT;
2622 stateId = TRVS_NORMAL;
2627 d->drawBackground(theme);
2628 tickreg -= theme.
rect;
2632 int ticks = slider->tickPosition;
2636 int interval = slider->tickInterval;
2637 if (interval <= 0) {
2638 interval = slider->singleStep;
2643 interval = slider->pageStep;
2647 int fudge =
len / 2;
2650 p->setPen(
d->sliderTickColor);
2652 int v = slider->minimum;
2653 while (v <= slider->maximum + 1) {
2654 if (
v == slider->maximum + 1 && interval == 1)
2656 const int v_ =
qMin(
v, slider->maximum);
2657 int tickLength = (v_ == slider->minimum || v_ >= slider->maximum) ? 4 : 3;
2659 v_, available) + fudge;
2663 pos, tickOffset - 1 - bothOffset - tickLength));
2667 pos, tickOffset + thickness + bothOffset + tickLength));
2671 tickOffset - 1 - bothOffset - tickLength,
pos));
2675 tickOffset + thickness + bothOffset + tickLength,
pos));
2678 int nextInterval =
v + interval;
2679 if (nextInterval <
v)
2694 partId = TKP_THUMBTOP;
2696 partId = TKP_THUMBBOTTOM;
2701 stateId = TUS_DISABLED;
2703 stateId = TUS_PRESSED;
2707 stateId = TUS_FOCUSED;
2709 stateId = TUS_NORMAL;
2712 partId = TKP_THUMBLEFT;
2714 partId = TKP_THUMBRIGHT;
2716 partId = TKP_THUMBVERT;
2719 stateId = TUVS_DISABLED;
2721 stateId = TUVS_PRESSED;
2725 stateId = TUVS_FOCUSED;
2727 stateId = TUVS_NORMAL;
2731 d->drawBackground(theme);
2735 fropt.QStyleOption::operator=(*slider);
2742#if 0 && QT_CONFIG(toolbutton)
2745 = qstyleoption_cast<const QStyleOptionToolButton *>(
option)) {
2750 State bflags = toolbutton->state & ~State_Sunken;
2751 State mflags = bflags;
2755 bflags &= ~State_Raised;
2774 theme.
partId = TP_SPLITBUTTON;
2777 stateId = TS_DISABLED;
2779 stateId = TS_PRESSED;
2783 stateId = TS_CHECKED;
2785 stateId = TS_NORMAL;
2789 d->drawBackground(theme);
2792 tool.
state = bflags;
2803 fr.QStyleOption::operator=(*toolbutton);
2814 label.state &= ~State_Sunken;
2819 tool.
rect = menuarea;
2820 tool.
state = mflags;
2824 tool.
state = mflags;
2825 menuarea.
adjust(-2, 0, 0, 0);
2829 p->setClipRect(menuarea);
2836 p->setPen(
option->palette.dark().color());
2837 p->drawLine(menuarea.
left(), menuarea.
top() + 3,
2839 p->setPen(
option->palette.light().color());
2840 p->drawLine(menuarea.
left() - 1, menuarea.
top() + 3,
2849 QRect ir = toolbutton->rect;
2870 stateId = CS_DISABLED;
2872 stateId = CS_ACTIVE;
2874 stateId = CS_INACTIVE;
2878 d->drawBackground(theme);
2883 GetThemeEnumValue(theme.
handle(), WP_CAPTION,
isActive ? CS_ACTIVE : CS_INACTIVE, TMT_TEXTSHADOWTYPE, &
result);
2885 COLORREF textShadowRef;
2887 QColor textShadow =
qRgb(GetRValue(textShadowRef), GetGValue(textShadowRef), GetBValue(textShadowRef));
2888 p->setPen(textShadow);
2889 p->drawText(
int(ir.
x() + 3 * factor),
int(ir.
y() + 2 * factor),
2893 COLORREF captionText = GetSysColor(
isActive ? COLOR_CAPTIONTEXT : COLOR_INACTIVECAPTIONTEXT);
2894 QColor textColor =
qRgb(GetRValue(captionText), GetGValue(captionText), GetBValue(captionText));
2895 p->setPen(textColor);
2896 p->drawText(
int(ir.
x() + 2 * factor),
int(ir.
y() + 1 * factor),
2902 partId = WP_SYSBUTTON;
2904 stateId = SBS_DISABLED;
2906 stateId = SBS_PUSHED;
2910 stateId = SBS_NORMAL;
2911 if (!tb->icon.isNull()) {
2912 tb->icon.paint(
p, theme.
rect);
2923 d->drawBackground(theme);
2931 d->drawBackground(theme);
2936 d->drawBackground(theme);
2941 d->drawBackground(theme);
2948 if (drawNormalButton) {
2950 d->drawBackground(theme);
2955 d->drawBackground(theme);
2960 d->drawBackground(theme);
2964 d->drawBackground(theme);
2970#if 0 && QT_CONFIG(mdiarea)
2979 d->drawBackground(theme, mdiButtonCorrectionFactor(theme));
2983 d->drawBackground(theme, mdiButtonCorrectionFactor(theme));
2987 d->drawBackground(theme, mdiButtonCorrectionFactor(theme));
2992#if 0 && QT_CONFIG(dial)
3030 ? GetSystemMetrics(SM_CYSMCAPTION) + GetSystemMetrics(SM_CXSIZEFRAME)
3031 : GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CXSIZEFRAME);
3076 switch (tab->shape) {
3103#if 0 && QT_CONFIG(toolbar)
3116 res = qstyleoption_cast<const QStyleOptionToolButton *>(
option) ? 1 : 0;
3135 bool retVal =
false;
3195 rect.adjust(9, 9, -9, -9);
3202 const bool isToolTitle =
false;
3203 const int height = tb->rect.height();
3204 const int width = tb->rect.width();
3207 int buttonHeight =
qRound(
qreal(GetSystemMetrics(SM_CYSIZE)) * factor)
3209 int buttonWidth =
qRound(
qreal(GetSystemMetrics(SM_CXSIZE)) * factor)
3211 const int delta = buttonWidth + 2;
3212 int controlTop =
option->rect.bottom() - buttonHeight - 2;
3223 switch (subControl) {
3228 rect.adjust(0, 0, -buttonWidth - 3, 0);
3230 if (minimizeHint || maximizeHint)
3231 rect.adjust(0, 0, -buttonWidth - 2, 0);
3238 rect.adjust(0, 0, -buttonWidth - 2, 0);
3240 rect.adjust(0, 0, -buttonWidth - 2, 0);
3242 rect.adjust(0, 0, -buttonWidth - 2, 0);
3244 rect.adjust(0, 0, -buttonWidth - 2, 0);
3291 buttonWidth, buttonHeight);
3296 const int controlTop = 6;
3297 const int controlHeight =
height - controlTop - 3;
3300 if (tb->icon.isNull())
3302 int hPad = (controlHeight -
iconSize.height())/2;
3303 int vPad = (controlHeight -
iconSize.width())/2;
3315 const int x = cmb->rect.x(),
y = cmb->rect.y(), wi = cmb->rect.width(), he = cmb->rect.height();
3318 switch (subControl) {
3349#if 0 && QT_CONFIG(mdiarea)
3352 int numSubControls = 0;
3359 if (numSubControls == 0)
3362 int buttonWidth =
option->rect.width() / numSubControls;
3364 switch (subControl) {
3367 if (numSubControls == 1)
3400 const QSize &contentsSize)
const
3405 QSize sz(contentsSize);
3412 return QSize(20, 20);
3417 if (!borderSize.
isNull()) {
3424 + textMargins, 23), 0);
3434#if 0 && QT_CONFIG(menubar)
3470 QStyle::SubControls
sub = slider->subControls;
3471 const int TickSpace = 5;
3481 const int SliderLength = 84;
3500 szw =
qMax(szw, scrollBarSliderMin);
3501 szh = scrollBarHeight;
3503 szw =
qMax(szw, scrollBarSliderMin + 2 * scrollBarHeight);
3504 szh = scrollBarHeight;
3509 szw =
qMax(szw, sbextent);
3510 szh = scrollBarHeight;
3550 res =
d->groupBoxTextColor;
3552 res =
d->groupBoxTextColorDisabled;
3564 if (
mask && titlebar) {
3575 WP_MINCAPTION, CS_ACTIVE, titleBarRect);
3579 WP_CAPTION, CS_ACTIVE, titleBarRect);
3581 mask->region =
d->region(themeData) +
3586#if 0 && QT_CONFIG(rubberband)
3588 if (qstyleoption_cast<const QStyleOptionRubberBand *>(
option))
3611 if (
const auto option = qstyleoption_cast<const QStyleOptionSlider *>(
opt)) {
3648 if (qstyleoption_cast<const QStyleOptionDockWidget *>(
option))
3679 if (qstyleoption_cast<const QStyleOptionDockWidget *>(
option))
3681 if (
d->dockFloat.isNull()) {
3683 WP_SMALLCLOSEBUTTON, CBS_NORMAL);
3685 WP_MAXBUTTON, MAXBS_NORMAL);
3693 d->drawBackground(theme);
3697 d->drawBackground(theme);
3701 d->drawBackground(theme);
3705 d->drawBackground(theme);
3710 return d->dockFloat;
3715 if (qstyleoption_cast<const QStyleOptionDockWidget *>(
option))
3717 if (
d->dockClose.isNull()) {
3719 WP_SMALLCLOSEBUTTON, CBS_NORMAL);
3726 theme.
partId = WP_CLOSEBUTTON;
3728 d->drawBackground(theme);
3732 d->drawBackground(theme);
3736 d->drawBackground(theme);
3740 d->drawBackground(theme);
3745 return d->dockClose;
3749 if (qstyleoption_cast<const QStyleOptionDockWidget *>(
option))
3751 if (
d->dockFloat.isNull()) {
3753 WP_SMALLCLOSEBUTTON, CBS_NORMAL);
3755 WP_RESTOREBUTTON, RBS_NORMAL);
3763 d->drawBackground(theme);
3767 d->drawBackground(theme);
3771 d->drawBackground(theme);
3775 d->drawBackground(theme);
3780 return d->dockFloat;
3800#ifndef QT_NO_DEBUG_STREAM
3805 d <<
"XPThemeData(" <<
t.window <<
", theme=#" <<
t.theme <<
", " <<
t.htheme
3806 <<
", partId=" <<
t.partId <<
", stateId=" <<
t.stateId <<
", rect=" <<
t.rect
3807 <<
", mirrorHorizontally=" <<
t.mirrorHorizontally <<
", mirrorVertically="
3808 <<
t.mirrorVertically <<
", noBorder=" <<
t.noBorder <<
", noContent=" <<
t.noContent
3809 <<
", rotate=" <<
t.rotate <<
')';
3817 d <<
"ThemeMapKey(theme=#" << k.
theme
3827 d <<
"ThemeMapData(alphaType=" << td.
alphaType
3839#ifdef DEBUG_XP_STYLE
3841#define TMT_ENUMDEF 8
3842#define TMT_ENUMVAL TEXT('A')
3843#define TMT_ENUM TEXT('B')
3844#define SCHEMA_STRINGS
3846#include <tmschema.h>
3858 return wcscmp(
a.propName,
b.propName) < 0;
3876void QWindowsXPStylePrivate::dumpNativeDIB(
int w,
int h)
3879 static int pCount = 0;
3880 DWORD *bufPix = (DWORD*)bufferPixels;
3882 char *bufferDump =
new char[bufferH * bufferW * 16];
3883 char *bufferPos = bufferDump;
3885 memset(bufferDump, 0,
sizeof(bufferDump));
3886 bufferPos += sprintf(bufferPos,
"const int pixelBufferW%d = %d;\n", pCount,
w);
3887 bufferPos += sprintf(bufferPos,
"const int pixelBufferH%d = %d;\n", pCount,
h);
3888 bufferPos += sprintf(bufferPos,
"const unsigned DWORD pixelBuffer%d[] = {", pCount);
3889 for (
int iy = 0; iy <
h; ++iy) {
3890 bufferPos += sprintf(bufferPos,
"\n ");
3891 bufPix = (DWORD*)(bufferPixels + (iy * bufferW * 4));
3892 for (
int ix = 0; ix <
w; ++ix) {
3893 bufferPos += sprintf(bufferPos,
"0x%08x, ", *bufPix);
3897 bufferPos += sprintf(bufferPos,
"\n};\n\n");
3900 delete[] bufferDump;
3908static void showProperty(XPThemeData &themeData,
const PropPair &prop)
3910 PROPERTYORIGIN origin = PO_NOTFOUND;
3911 GetThemePropertyOrigin(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue, &origin);
3912 const char *originStr;
3915 originStr =
"State ";
3918 originStr =
"Part ";
3921 originStr =
"Class ";
3924 originStr =
"Globl ";
3928 originStr =
"Unkwn ";
3932 switch (prop.propType) {
3936 GetThemeString(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue,
buffer, 512);
3937 printf(
" (%sString) %-20S: %S\n", originStr, prop.propName,
buffer);
3943 GetThemeEnumValue(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue, &
result);
3944 printf(
" (%sEnum) %-20S: %d\n", originStr, prop.propName,
result);
3950 GetThemeInt(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue, &
result);
3951 printf(
" (%sint) %-20S: %d\n", originStr, prop.propName,
result);
3957 GetThemeBool(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue, &
result);
3958 printf(
" (%sbool) %-20S: %d\n", originStr, prop.propName,
result);
3964 GetThemeColor(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue, &
result);
3965 printf(
" (%scolor) %-20S: 0x%08X\n", originStr, prop.propName,
result);
3972 GetThemeMargins(themeData.handle(), 0, themeData.partId, themeData.stateId, prop.propValue, 0, &
result);
3973 printf(
" (%smargins) %-20S: (%d, %d, %d, %d)\n", originStr,
3980 GetThemeFilename(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue,
buffer, 512);
3981 printf(
" (%sfilename)%-20S: %S\n", originStr, prop.propName,
buffer);
3989 memset(&result1, 0,
sizeof(result1));
3990 memset(&result2, 0,
sizeof(result2));
3991 memset(&result3, 0,
sizeof(result3));
3992 GetThemePartSize(themeData.handle(), 0, themeData.partId, themeData.stateId, 0, TS_MIN, &result1);
3993 GetThemePartSize(themeData.handle(), 0, themeData.partId, themeData.stateId, 0, TS_TRUE, &result2);
3994 GetThemePartSize(themeData.handle(), 0, themeData.partId, themeData.stateId, 0, TS_DRAW, &result3);
3995 printf(
" (%ssize) %-20S: Min (%d, %d), True(%d, %d), Draw(%d, %d)\n", originStr, prop.propName,
3996 result1.cx, result1.cy, result2.cx, result2.cy, result3.cx, result3.cy);
4003 GetThemePosition(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue, &
result);
4004 printf(
" (%sPosition)%-20S: (%d, %d)\n", originStr, prop.propName,
result.x,
result.y);
4011 GetThemeRect(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue, &
result);
4012 printf(
" (%sRect) %-20S: (%d, %d, %d, %d)\n", originStr, prop.propName,
result.left,
result.top,
result.right,
result.bottom);
4019 GetThemeFont(themeData.handle(), 0, themeData.partId, themeData.stateId, prop.propValue, &
result);
4020 printf(
" (%sFont) %-20S: %S height(%d) width(%d) weight(%d)\n", originStr, prop.propName,
4028 GetThemeIntList(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue, &
result);
4029 printf(
" (%sInt list)%-20S: { ", originStr, prop.propName);
4030 for (
int i = 0;
i <
result.iValueCount; ++
i)
4031 printf(
"%d ",
result.iValues[
i]);
4036 printf(
" %s%S : Unknown property type (%d)!\n", originStr, prop.propName, prop.propType);
4046void QWindowsXPStylePrivate::showProperties(XPThemeData &themeData)
4048 if (!all_props.
count()) {
4049 const TMSCHEMAINFO *infoTable = GetSchemaInfo();
4050 for (
int i = 0;
i < infoTable->iPropCount; ++
i) {
4051 int propType = infoTable->pPropTable[
i].bPrimVal;
4052 int propValue = infoTable->pPropTable[
i].sEnumVal;
4053 LPCWSTR propName = infoTable->pPropTable[
i].pszName;
4060 if (propType != propValue) {
4062 prop.propValue = propValue;
4063 prop.propName = propName;
4064 prop.propType = propType;
4069 std::sort(all_props.
begin(), all_props.
end());
4072 printf(
"part properties count = %d:\n", all_props.
count());
4073 printf(
" Enum Property Name Description\n");
4074 printf(
"-----------------------------------------------------------\n");
4076 pGetCurrentThemeName(
themeName, 256, 0, 0, 0, 0);
4077 for (
int j = 0;
j < all_props.
count(); ++
j) {
4078 PropPair prop = all_props.
at(
j);
4080 GetThemeDocumentationProperty(
themeName, prop.propName,
buf, 500);
4081 printf(
"%3d: (%4d) %-20S %S\n",
j, prop.propValue, prop.propName,
buf);
4086 printf(
"Global Properties:\n");
4087 for (
int j = 0;
j < all_props.
count(); ++
j) {
4088 PropPair prop = all_props.
at(
j);
4089 PROPERTYORIGIN origin = PO_NOTFOUND;
4090 GetThemePropertyOrigin(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue, &origin);
4091 if (origin == PO_GLOBAL) {
4092 showProperty(themeData, prop);
4098 for (
int j = 0;
j < all_props.
count(); ++
j) {
4099 PropPair prop = all_props.
at(
j);
4100 PROPERTYORIGIN origin = PO_NOTFOUND;
4101 GetThemePropertyOrigin(themeData.handle(), themeData.partId, themeData.stateId, prop.propValue, &origin);
4102 if (origin != PO_NOTFOUND)
4104 showProperty(themeData, prop);
const QColor & color() const
Returns the brush color.
The QColor class provides colors based on RGB, HSV or CMYK values.
QColor darker(int f=200) const noexcept
QColor toRgb() const noexcept
Create and returns an RGB QColor based on this color.
int red() const noexcept
Returns the red color component of this color.
int blue() const noexcept
Returns the blue color component of this color.
int green() const noexcept
Returns the green color component of this color.
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
void setBold(bool)
If enable is true sets the font's weight to \l{Weight}{QFont::Bold}; otherwise sets the weight to \l{...
static QPlatformNativeInterface * platformNativeInterface()
static QWindowList allWindows()
Returns a list of all the windows in the application.
QIcon windowIcon
the default window icon
T value(const Key &key) const noexcept
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
The QIcon class provides scalable icons in different modes and states.
Mode
This enum type describes the mode for which a pixmap is intended to be used.
qint64 cacheKey() const
Returns a number that identifies the contents of this QIcon object.
QSize actualSize(const QSize &size, Mode mode=Normal, State state=Off) const
Returns the actual size of the icon for the requested size, mode, and state.
QPixmap pixmap(const QSize &size, Mode mode=Normal, State state=Off) const
Returns a pixmap with the requested size, mode, and state, generating one if necessary.
QImage transformed(const QTransform &matrix, Qt::TransformationMode mode=Qt::FastTransformation) const
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
Format
The following image formats are available in Qt.
@ Format_ARGB32_Premultiplied
QImage mirrored(bool horizontally=false, bool vertically=true) const &
const_reference at(qsizetype i) const noexcept
qsizetype count() const noexcept
void append(parameter_type t)
constexpr qreal right() const noexcept
Returns the right margin.
constexpr qreal left() const noexcept
Returns the left margin.
constexpr qreal top() const noexcept
Returns the top margin.
constexpr bool isNull() const noexcept
Returns true if all margins are very close to 0; otherwise returns false.
constexpr qreal bottom() const noexcept
Returns the bottom margin.
constexpr void setTop(int top) noexcept
Sets the Top margin to Top.
constexpr int bottom() const noexcept
Returns the bottom margin.
constexpr void setBottom(int bottom) noexcept
Sets the bottom margin to bottom.
constexpr void setLeft(int left) noexcept
Sets the left margin to left.
constexpr int left() const noexcept
Returns the left margin.
constexpr int right() const noexcept
Returns the right margin.
constexpr int top() const noexcept
Returns the top margin.
constexpr void setRight(int right) noexcept
Sets the right margin to right.
virtual int devType() const
QRegion systemClip() const
The QPainter class performs low-level painting on widgets and other paint devices.
void setClipping(bool enable)
Enables clipping if enable is true, or disables clipping if enable is false.
QPaintDevice * device() const
Returns the paint device on which this painter is currently painting, or \nullptr if the painter is n...
QPaintEngine * paintEngine() const
Returns the paint engine that the painter is currently operating on if the painter is active; otherwi...
void restore()
Restores the current painter state (pops a saved state off the stack).
void save()
Saves the current painter state (pushes the state onto a stack).
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
Draws the rectangular portion source of the given image into the target rectangle in the paint device...
QRegion clipRegion() const
Returns the currently set clip region.
const QTransform & deviceTransform() const
Returns the matrix that transforms from logical coordinates to device coordinates of the platform dep...
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device.
bool isActive() const
Returns true if begin() has been called and end() has not yet been called; otherwise returns false.
bool hasClipping() const
Returns true if clipping has been set; otherwise returns false.
void setClipRegion(const QRegion &, Qt::ClipOperation op=Qt::ReplaceClip)
Sets the clip region to the given region using the specified clip operation.
The QPalette class contains color groups for each widget state.
void setColor(ColorGroup cg, ColorRole cr, const QColor &color)
Sets the color in the specified color group, used for the given color role, to the specified solid co...
const QBrush & highlightedText() const
Returns the highlighted text brush of the current color group.
static bool find(const QString &key, QPixmap *pixmap)
Looks for a cached pixmap associated with the given key in the cache.
static bool insert(const QString &key, const QPixmap &pixmap)
Inserts a copy of the pixmap pixmap associated with the key into the cache.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
QImage toImage() const
Converts the pixmap to a QImage.
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
int width() const
Returns the width of the pixmap.
QPixmap copy(int x, int y, int width, int height) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void fill(const QColor &fillColor=Qt::white)
Fills the pixmap with the given color.
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Converts the given image to a pixmap using the specified flags to control the conversion.
bool save(const QString &fileName, const char *format=nullptr, int quality=-1) const
Saves the pixmap to the file with the given fileName using the specified image file format and qualit...
\inmodule QtCore\reentrant
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
\inmodule QtCore\reentrant
constexpr int x() const noexcept
Returns the x coordinate of this point.
constexpr int y() const noexcept
Returns the y coordinate of this point.
QMargins ninePatchMargins(ControlElement ce, const QStyleOption *opt, const QSize &imageSize) const override
QRect subElementRect(SubElement r, const QStyleOption *opt) const override
QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc) const override
\reimp
Qt::WindowFlags titleBarFlags
Qt::LayoutDirection direction
const QStyle * proxy() const
virtual QPalette standardPalette() const
Returns the style's standard palette.
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr) const =0
@ SC_TitleBarNormalButton
@ SC_TitleBarUnshadeButton
@ SC_ComboBoxListBoxPopup
@ SC_TitleBarContextHelpButton
virtual void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const
Draws the given pixmap in the specified rectangle, according to the specified alignment,...
@ SE_DockWidgetCloseButton
@ SE_DockWidgetFloatButton
@ SE_TabWidgetTabContents
virtual void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p) const =0
virtual void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p) const =0
static int sliderPositionFromValue(int min, int max, int val, int space, bool upsideDown=false)
Converts the given logicalValue to a pixel position.
virtual QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc) const =0
static QRect visualRect(Qt::LayoutDirection direction, const QRect &boundingRect, const QRect &logicalRect)
Returns the given logicalRectangle converted to screen coordinates based on the specified direction.
@ SH_GroupBox_TextLabelColor
@ SH_SpinControls_DisableOnBounds
@ SH_ItemView_DrawDelegateFrame
virtual int styleHint(StyleHint stylehint, const QStyleOption *opt=nullptr, QStyleHintReturn *returnData=nullptr) const =0
@ PE_IndicatorItemViewItemCheck
@ PE_IndicatorHeaderArrow
@ PE_IndicatorRadioButton
@ PE_IndicatorToolBarHandle
@ PE_IndicatorButtonDropDown
@ PE_IndicatorMenuCheckMark
@ PE_IndicatorToolBarSeparator
@ PE_IndicatorProgressChunk
@ PE_IndicatorDockWidgetResizeHandle
virtual QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option=nullptr) const =0
@ PM_ButtonDefaultIndicator
@ PM_SliderTickmarkOffset
@ PM_MdiSubWindowFrameWidth
@ PM_SliderSpaceAvailable
@ PM_ProgressBarChunkWidth
@ PM_ExclusiveIndicatorHeight
@ PM_MdiSubWindowMinimizedWidth
@ PM_ExclusiveIndicatorWidth
@ PM_ButtonShiftHorizontal
@ PM_SliderControlThickness
@ PM_DockWidgetFrameWidth
@ PM_DockWidgetSeparatorExtent
@ PM_DockWidgetTitleMargin
virtual void drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole=QPalette::NoRole) const
Draws the given text in the specified rectangle using the provided painter and palette.
@ SP_TitleBarNormalButton
static qreal nativeMetricScaleFactor(const QStyleOption *option=nullptr)
The QWindowsStyle class provides a Microsoft Windows-like look and feel.
QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option=nullptr) const override
\reimp
void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p) const override
\reimp
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p) const override
\reimp
int pixelMetric(PixelMetric pm, const QStyleOption *option=nullptr) const override
\reimp
int styleHint(StyleHint hint, const QStyleOption *opt=nullptr, QStyleHintReturn *returnData=nullptr) const override
\reimp
QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt) const override
\reimp
void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p) const override
\reimp
QRect subElementRect(SubElement r, const QStyleOption *opt) const override
\reimp
QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &contentsSize) const override
\reimp
bool fixAlphaChannel(const QRect &rect)
bool drawBackground(XPThemeData &themeData, qreal correctionFactor=1)
bool drawBackgroundDirectly(HDC dc, XPThemeData &themeData, qreal aditionalDevicePixelRatio)
bool hasAlphaChannel(const QRect &rect)
void init(bool force=false)
static HWND winId(const QWindow *window)
QRegion region(XPThemeData &themeData)
static QRect scrollBarGripperBounds(QStyle::State flags, XPThemeData *theme)
HBITMAP buffer(int w=0, int h=0)
static QString themeName(int theme)
bool drawBackgroundThruNativeBuffer(XPThemeData &themeData, qreal aditionalDevicePixelRatio, qreal correctionFactor)
bool isTransparent(XPThemeData &themeData)
static bool useXP(bool update=false)
void cleanup(bool force=false)
bool swapAlphaChannel(const QRect &rect, bool allPixels=false)
static int pixelMetricFromSystemDp(QStyle::PixelMetric pm, const QStyleOption *option=nullptr)
static HTHEME createTheme(int theme, HWND hwnd)
QPixmap standardPixmap(StandardPixmap standardIcon, const QStyleOption *option) const override
\reimp
void drawPrimitive(PrimitiveElement pe, const QStyleOption *option, QPainter *p) const override
\reimp
QRect subElementRect(SubElement r, const QStyleOption *option) const override
\reimp
QMargins ninePatchMargins(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, const QSize &imageSize) const override
int styleHint(StyleHint hint, const QStyleOption *option=nullptr, QStyleHintReturn *returnData=nullptr) const override
\reimp
~QWindowsXPStyle() override
Destroys the style.
QSize sizeFromContents(ContentsType ct, const QStyleOption *option, const QSize &contentsSize) const override
\reimp
QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option=nullptr) const override
\reimp
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *option, QPainter *p) const override
\reimp
QWindowsXPStyle()
Constructs a QWindowsStyle.
void drawControl(ControlElement element, const QStyleOption *option, QPainter *p) const override
\reimp
int pixelMetric(PixelMetric pm, const QStyleOption *option=nullptr) const override
\reimp
QPalette standardPalette() const override
\reimp
QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *option, SubControl sc) const override
\reimp
QMarginsF margins(const QRect &rect, int propId=TMT_CONTENTMARGINS)
static RECT toRECT(const QRect &qr)
static QSizeF themeSize(const QWindow *w=nullptr, QPainter *p=nullptr, int themeIn=-1, int part=0, int state=0)
\inmodule QtCore\reentrant
constexpr void moveTo(qreal x, qreal y) noexcept
Moves the rectangle, leaving the top-left corner at the given position (x, y).
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr QRectF translated(qreal dx, qreal dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
constexpr QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const noexcept
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
constexpr QPointF topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
constexpr QRect toRect() const noexcept
Returns a QRect based on the values of this rectangle.
constexpr bool isValid() const noexcept
Returns true if the rectangle is valid, otherwise returns false.
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr void adjust(int x1, int y1, int x2, int y2) noexcept
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
constexpr void moveCenter(const QPoint &p) noexcept
Moves the rectangle, leaving the center point at the given position.
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr int bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
constexpr QPoint topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr QRect adjusted(int x1, int y1, int x2, int y2) const noexcept
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
constexpr int top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr QPoint topRight() const noexcept
Returns the position of the rectangle's top-right corner.
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr QSize size() const noexcept
Returns the size of the rectangle.
constexpr int width() const noexcept
Returns the width of the rectangle.
QRect united(const QRect &other) const noexcept
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr void setHeight(int h) noexcept
Sets the height of the rectangle to the given height.
constexpr QPoint center() const noexcept
Returns the center point of the rectangle.
constexpr int right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
The QRegion class specifies a clip region for a painter.
QRect boundingRect() const noexcept
Returns the bounding rectangle of this region.
int rectCount() const noexcept
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
QRegion translated(int dx, int dy) const
constexpr qreal width() const noexcept
Returns the width.
constexpr bool isEmpty() const noexcept
Returns true if either of the width and height is less than or equal to 0; otherwise returns false.
constexpr qreal height() const noexcept
Returns the height.
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
constexpr int & rheight() noexcept
Returns a reference to the height.
constexpr QSize expandedTo(const QSize &) const noexcept
Returns a size holding the maximum width and height of this size and the given otherSize.
constexpr void setWidth(int w) noexcept
Sets the width to the given width.
constexpr int & rwidth() noexcept
Returns a reference to the width.
constexpr bool isEmpty() const noexcept
Returns true if either of the width and height is less than or equal to 0; otherwise returns false.
constexpr void setHeight(int h) noexcept
Sets the height to the given height.
void transpose() noexcept
Swaps the width and height values.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString fromWCharArray(const wchar_t *string, qsizetype size=-1)
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString & append(QChar c)
static QString static QString qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
constexpr size_type size() const noexcept
const T * constData() const
const QStyleOptionButton * btn
[3]
void qErrnoWarning(const char *msg,...)
qreal dpi(const QStyleOption *option)
qreal dpiScaled(qreal value, qreal dpi)
void drawDial(const QStyleOptionSlider *option, QPainter *painter)
static void populateTitleBarButtonTheme(const QStyle *proxy, const QStyleOptionComplex *option, QStyle::SubControl subControl, bool isTitleBarActive, int part, XPThemeData *theme)
static HRGN qt_hrgn_from_qregion(const QRegion ®ion)
static const int windowsArrowHMargin
static const int windowsItemVMargin
static HWND createTreeViewHelperWindow()
static const int windowsRightBorder
static const wchar_t * themeNames[QWindowsXPStylePrivate::NThemes]
static QRegion scaleRegion(const QRegion ®ion, qreal factor)
static void qt_add_rect(HRGN &winRegion, QRect r)
static Qt::Orientation progressBarOrientation(const QStyleOption *option=nullptr)
QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
static const int windowsItemFrame
static bool buttonVisible(const QStyle::SubControl sc, const QStyleOptionTitleBar *tb)
static QRectF scaleRect(const QRectF &r, qreal factor)
static const int windowsItemHMargin
Combined button and popup list for selecting options.
@ WindowContextHelpButtonHint
@ WindowMaximizeButtonHint
@ WindowMinimizeButtonHint
#define Q_BASIC_ATOMIC_INITIALIZER(a)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter * sub
static QString header(const QString &name)
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
int qRound(qfloat16 d) noexcept
static int area(const QSize &s)
static const double leftOffset
#define SIZE(large, small, mini)
static const QStyle::SubControl SubControls[]
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qMax(const T &a, const T &b)
#define Q_RETURN_ARG(Type, data)
#define Q_ARG(Type, data)
static QString themeName()
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLenum GLsizei GLsizei GLsizei GLint border
GLuint GLsizei const GLchar * label
[43]
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLuint GLenum transformType
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLint GLsizei GLsizei GLenum format
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei imageSize
GLfloat GLfloat GLfloat GLfloat h
GLuint GLenum GLenum transform
GLfloat GLfloat GLfloat alpha
static bool hasAlpha(const QImage &image)
#define ERROR(description)
static QT_BEGIN_NAMESPACE qreal dpr(const QWindow *w)
#define Q_ASSERT_X(cond, x, msg)
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
constexpr QRgb qRgb(int r, int g, int b)
constexpr int qRed(QRgb rgb)
constexpr int qGreen(QRgb rgb)
constexpr int qBlue(QRgb rgb)
constexpr int qAlpha(QRgb rgb)
static bool operator<(const QSettingsIniKey &k1, const QSettingsIniKey &k2)
#define qPrintable(string)
#define QStringLiteral(str)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define QT_BEGIN_INCLUDE_NAMESPACE
#define QT_END_INCLUDE_NAMESPACE
#define TMT_TEXTSHADOWCOLOR
static bool isFullyOpaque(const QWindowsThemeData &themeData)
#define TMT_CONTENTMARGINS
#define TMT_SIZINGMARGINS
@ HighDpiScalingTransform
QRandomGenerator64 rd
[10]
rect deviceTransform(view->viewportTransform()).map(QPointF(0
\inmodule QtCore \reentrant
AlphaChannelType alphaType