Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qcocoatheme.mm
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include <AppKit/AppKit.h>
5
6#include "qcocoatheme.h"
7
8#include <QtCore/QOperatingSystemVersion>
9#include <QtCore/QVariant>
10
12#include "qcocoamenuitem.h"
13#include "qcocoamenu.h"
14#include "qcocoamenubar.h"
15#include "qcocoahelpers.h"
16
17#include <QtCore/qfileinfo.h>
18#include <QtCore/private/qcore_mac_p.h>
19#include <QtGui/private/qfont_p.h>
20#include <QtGui/private/qguiapplication_p.h>
21#include <QtGui/private/qcoregraphics_p.h>
22#include <QtGui/qpainter.h>
23#include <QtGui/qtextformat.h>
24#include <QtGui/private/qcoretextfontdatabase_p.h>
25#include <QtGui/private/qfontengine_coretext_p.h>
26#include <QtGui/private/qabstractfileiconengine_p.h>
27#include <qpa/qplatformdialoghelper.h>
28#include <qpa/qplatformintegration.h>
29#include <qpa/qplatformnativeinterface.h>
30
34#include "qcocoamessagedialog.h"
35
36#include <CoreServices/CoreServices.h>
37
39
41{
42 QColor qc;
43
44 // Standard palette initialization (copied from Qt 4 styles)
45 QBrush backgroundBrush = qt_mac_toQBrush([NSColor windowBackgroundColor]);
46 QColor background = backgroundBrush.color();
47 QColor light(background.lighter(110));
48 QColor dark(background.darker(160));
49 QColor mid(background.darker(140));
50 QPalette *palette = new QPalette(Qt::black, background, light, dark, mid, Qt::black, Qt::white);
51
52 palette->setBrush(QPalette::Window, backgroundBrush);
53
56 palette->setBrush(QPalette::Disabled, QPalette::Base, backgroundBrush);
57 QBrush textBackgroundBrush = qt_mac_toQBrush([NSColor textBackgroundColor]);
58 palette->setBrush(QPalette::Active, QPalette::Base, textBackgroundBrush);
59 palette->setBrush(QPalette::Inactive, QPalette::Base, textBackgroundBrush);
60 palette->setColor(QPalette::Disabled, QPalette::Dark, QColor(191, 191, 191));
61 palette->setColor(QPalette::Active, QPalette::Dark, QColor(191, 191, 191));
62 palette->setColor(QPalette::Inactive, QPalette::Dark, QColor(191, 191, 191));
63
64 // System palette initialization:
65 QBrush br = qt_mac_toQBrush([NSColor selectedControlColor]);
67 const auto inactiveHighlight = qt_mac_toQBrush([NSColor unemphasizedSelectedContentBackgroundColor]);
68 palette->setBrush(QPalette::Inactive, QPalette::Highlight, inactiveHighlight);
69 palette->setBrush(QPalette::Disabled, QPalette::Highlight, inactiveHighlight);
70
71 palette->setBrush(QPalette::Shadow, qt_mac_toQColor([NSColor shadowColor]));
72
73 qc = qt_mac_toQColor([NSColor controlTextColor]);
81
82 qc = qt_mac_toQColor([NSColor disabledControlTextColor]);
87
88 palette->setBrush(QPalette::ToolTipBase, qt_mac_toQBrush([NSColor controlColor]));
89
90 palette->setColor(QPalette::Normal, QPalette::Link, qt_mac_toQColor([NSColor linkColor]));
91
92 qc = qt_mac_toQColor([NSColor placeholderTextColor]);
96
97 qc = qt_mac_toQColor([NSColor controlAccentColor]);
98 palette->setColor(QPalette::AccentColor, qc);
99
100 return palette;
101}
102
104 inline QMacPaletteMap(QPlatformTheme::Palette p, NSColor *a, NSColor *i) :
105 active(a), inactive(i), paletteRole(p) { }
106
107 NSColor *active;
108 NSColor *inactive;
110};
111
112#define MAC_PALETTE_ENTRY(pal, active, inactive) \
113 QMacPaletteMap(pal, [NSColor active], [NSColor inactive])
115 MAC_PALETTE_ENTRY(QPlatformTheme::ToolButtonPalette, controlTextColor, disabledControlTextColor),
116 MAC_PALETTE_ENTRY(QPlatformTheme::ButtonPalette, controlTextColor, disabledControlTextColor),
117 MAC_PALETTE_ENTRY(QPlatformTheme::HeaderPalette, headerTextColor, disabledControlTextColor),
118 MAC_PALETTE_ENTRY(QPlatformTheme::ComboBoxPalette, controlTextColor, disabledControlTextColor),
119 MAC_PALETTE_ENTRY(QPlatformTheme::ItemViewPalette, textColor, disabledControlTextColor),
120 MAC_PALETTE_ENTRY(QPlatformTheme::MessageBoxLabelPalette, textColor, disabledControlTextColor),
121 MAC_PALETTE_ENTRY(QPlatformTheme::TabBarPalette, controlTextColor, disabledControlTextColor),
122 MAC_PALETTE_ENTRY(QPlatformTheme::LabelPalette, textColor, disabledControlTextColor),
123 MAC_PALETTE_ENTRY(QPlatformTheme::GroupBoxPalette, textColor, disabledControlTextColor),
124 MAC_PALETTE_ENTRY(QPlatformTheme::MenuPalette, controlTextColor, disabledControlTextColor),
125 MAC_PALETTE_ENTRY(QPlatformTheme::MenuBarPalette, controlTextColor, disabledControlTextColor),
126 MAC_PALETTE_ENTRY(QPlatformTheme::TextEditPalette, textColor, disabledControlTextColor),
127 MAC_PALETTE_ENTRY(QPlatformTheme::TextLineEditPalette, textColor, disabledControlTextColor)
128};
129#undef MAC_PALETTE_ENTRY
130
131static const int mac_widget_colors_count = sizeof(mac_widget_colors) / sizeof(mac_widget_colors[0]);
132
134{
136 QColor qc;
137 for (int i = 0; i < mac_widget_colors_count; i++) {
139 if (mac_widget_colors[i].active) {
140 qc = qt_mac_toQColor(mac_widget_colors[i].active);
149 qc = qt_mac_toQColor(mac_widget_colors[i].inactive);
154 }
157 // Cheap approximation for NSVisualEffectView (see deprecation note for selectedMenuItemTextColor)
158 auto selectedMenuItemColor = [[NSColor controlAccentColor] highlightWithLevel:0.3];
159 pal.setBrush(QPalette::Highlight, qt_mac_toQColor(selectedMenuItemColor));
160 qc = qt_mac_toQColor([NSColor labelColor]);
162 pal.setBrush(QPalette::Text, qc);
163 qc = qt_mac_toQColor([NSColor selectedMenuItemTextColor]);
165 qc = qt_mac_toQColor([NSColor disabledControlTextColor]);
167 } else if ((mac_widget_colors[i].paletteRole == QPlatformTheme::ButtonPalette)
176 } else if (mac_widget_colors[i].paletteRole == QPlatformTheme::ItemViewPalette) {
177 NSArray<NSColor *> *baseColors = nil;
178 NSColor *activeHighlightColor = nil;
179 baseColors = [NSColor alternatingContentBackgroundColors];
180 activeHighlightColor = [NSColor selectedContentBackgroundColor];
182 qt_mac_toQBrush([NSColor unemphasizedSelectedTextColor]));
183 pal.setBrush(QPalette::Base, qt_mac_toQBrush(baseColors[0]));
186 qt_mac_toQBrush(activeHighlightColor));
188 qt_mac_toQBrush([NSColor alternateSelectedControlTextColor]));
191 } else if (mac_widget_colors[i].paletteRole == QPlatformTheme::TextEditPalette) {
192 pal.setBrush(QPalette::Active, QPalette::Base, qt_mac_toQColor([NSColor textBackgroundColor]));
199 pal.setBrush(QPalette::Active, QPalette::Base, qt_mac_toQColor([NSColor textBackgroundColor]));
202 } else if (mac_widget_colors[i].paletteRole == QPlatformTheme::LabelPalette) {
203 qc = qt_mac_toQColor([NSColor labelColor]);
205 }
206 palettes.insert(mac_widget_colors[i].paletteRole, &pal);
207 }
208 return palettes;
209}
210
211const char *QCocoaTheme::name = "cocoa";
212
214 : m_systemPalette(nullptr)
215{
217 m_appearanceObserver = QMacKeyValueObserver(NSApp, @"effectiveAppearance", [this] {
218 NSAppearance.currentAppearance = NSApp.effectiveAppearance;
220 });
221 }
222
223 m_systemColorObserver = QMacNotificationObserver(nil,
224 NSSystemColorsDidChangeNotification, [this] {
226 });
227}
228
230{
231 reset();
232}
233
235{
236 delete m_systemPalette;
237 m_systemPalette = nullptr;
238 qDeleteAll(m_palettes);
239 m_palettes.clear();
240}
241
243{
244 reset();
245 m_systemPalette = qt_mac_createSystemPalette();
246 m_palettes = qt_mac_createRolePalettes();
247
249 // Re-populate glyph caches based on the new appearance's assumed text fill color
251 }
252
253 QWindowSystemInterface::handleThemeChange<QWindowSystemInterface::SynchronousDelivery>();
254}
255
257{
258 switch (dialogType) {
263 return true;
264 default:
265 return false;
266 }
267}
268
270{
271 switch (dialogType) {
273 return new QCocoaFileDialogHelper();
275 return new QCocoaColorDialogHelper();
277 return new QCocoaFontDialogHelper();
279 return new QCocoaMessageDialog;
280 default:
281 return nullptr;
282 }
283}
284
285#ifndef QT_NO_SYSTEMTRAYICON
287{
288 return new QCocoaSystemTrayIcon;
289}
290#endif
291
293{
294 if (type == SystemPalette) {
295 if (!m_systemPalette)
296 m_systemPalette = qt_mac_createSystemPalette();
297 return m_systemPalette;
298 } else {
299 if (m_palettes.isEmpty())
300 m_palettes = qt_mac_createRolePalettes();
301 return m_palettes.value(type, nullptr);
302 }
303 return nullptr;
304}
305
307{
308 const auto *platformIntegration = QGuiApplicationPrivate::platformIntegration();
309 const auto *coreTextFontDatabase = static_cast<QCoreTextFontDatabase *>(platformIntegration->fontDatabase());
310 return coreTextFontDatabase->themeFont(type);
311}
312
315{
317 ret.fill(QColor(0, 0, 0, 0));
318
319 CGRect rect = CGRectMake(0, 0, width, height);
320
322 CGAffineTransform old_xform = CGContextGetCTM(ctx);
323 CGContextConcatCTM(ctx, CGAffineTransformInvert(old_xform));
324 CGContextConcatCTM(ctx, CGAffineTransformIdentity);
325
326 ::RGBColor b;
327 b.blue = b.green = b.red = 255*255;
328 PlotIconRefInContext(ctx, &rect, kAlignNone, kTransformNone, &b, kPlotIconRefNormalFlags, icon);
329 return ret;
330}
331
333{
334 OSType iconType = 0;
335 switch (sp) {
337 iconType = kQuestionMarkIcon;
338 break;
340 iconType = kAlertNoteIcon;
341 break;
343 iconType = kAlertCautionIcon;
344 break;
346 iconType = kAlertStopIcon;
347 break;
348 case DesktopIcon:
349 iconType = kDesktopIcon;
350 break;
351 case TrashIcon:
352 iconType = kTrashIcon;
353 break;
354 case ComputerIcon:
355 iconType = kComputerIcon;
356 break;
357 case DriveFDIcon:
358 iconType = kGenericFloppyIcon;
359 break;
360 case DriveHDIcon:
361 iconType = kGenericHardDiskIcon;
362 break;
363 case DriveCDIcon:
364 case DriveDVDIcon:
365 iconType = kGenericCDROMIcon;
366 break;
367 case DriveNetIcon:
368 iconType = kGenericNetworkIcon;
369 break;
370 case DirOpenIcon:
371 iconType = kOpenFolderIcon;
372 break;
373 case DirClosedIcon:
374 case DirLinkIcon:
375 iconType = kGenericFolderIcon;
376 break;
377 case FileLinkIcon:
378 case FileIcon:
379 iconType = kGenericDocumentIcon;
380 break;
381 default:
382 break;
383 }
384 if (iconType != 0) {
386 IconRef icon = nullptr;
387 QT_IGNORE_DEPRECATIONS(GetIconRef(kOnSystemDisk, kSystemIconsCreator, iconType, &icon));
388
389 if (icon) {
390 pixmap = qt_mac_convert_iconref(icon, size.width(), size.height());
391 QT_IGNORE_DEPRECATIONS(ReleaseIconRef(icon));
392 }
393
394 return pixmap;
395 }
396
398}
399
401{
402public:
404 QPlatformTheme::IconOptions opts) :
406
408 {
409 const qreal devicePixelRatio = qGuiApp->devicePixelRatio();
410 const int sizes[] = {
411 qRound(16 * devicePixelRatio), qRound(32 * devicePixelRatio),
412 qRound(64 * devicePixelRatio), qRound(128 * devicePixelRatio),
413 qRound(256 * devicePixelRatio)
414 };
415 return QAbstractFileIconEngine::toSizeList(sizes, sizes + sizeof(sizes) / sizeof(sizes[0]));
416 }
417
420
421protected:
423 {
425
426 NSImage *iconImage = [[NSWorkspace sharedWorkspace] iconForFile:fileInfo().canonicalFilePath().toNSString()];
427 if (!iconImage)
428 return QPixmap();
429 return qt_mac_toQPixmap(iconImage, size);
430 }
431};
432
433QIcon QCocoaTheme::fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions) const
434{
435 return QIcon(new QCocoaFileIconEngine(fileInfo, iconOptions));
436}
437
439{
440 switch (hint) {
442 return QStringList(QStringLiteral("macOS"));
445 case KeyboardScheme:
446 return QVariant(int(MacKeyboardScheme));
447 case TabFocusBehavior:
448 return QVariant([[NSApplication sharedApplication] isFullKeyboardAccessEnabled] ?
450 case IconPixmapSizes:
453 return QVariant(QChar(0x2022));
455 return QVariant(int(HoverEffect));
459 return QVariant(bool([[NSApplication sharedApplication] presentationOptions] & NSApplicationPresentationFullScreen));
461 return !NSScreen.screensHaveSeparateSpaces;
463 return false;
465 return NSEvent.doubleClickInterval * 1000;
467 return NSEvent.keyRepeatDelay * 1000;
469 return 1.0 / NSEvent.keyRepeatInterval;
470 default:
471 break;
472 }
474}
475
477{
478 return qt_mac_applicationIsInDarkMode() ? Qt::ColorScheme::Dark : Qt::ColorScheme::Light;
479}
480
482{
484 QCoreApplication::translate("QCocoaTheme", "Don't Save")
486}
487
489{
491 : QPlatformTheme::standardButtonShortcut(button);
492}
493
495{
496 return new QCocoaMenuItem();
497}
498
500{
501 return new QCocoaMenu();
502}
503
505{
506 static bool haveMenubar = false;
507 if (!haveMenubar) {
508 haveMenubar = true;
509 QObject::connect(qGuiApp, SIGNAL(focusWindowChanged(QWindow*)),
511 SLOT(onAppFocusWindowChanged(QWindow*)));
512 }
513
514 return new QCocoaMenuBar();
515}
516
517#ifndef QT_NO_SHORTCUT
519{
520 // The default key bindings in QPlatformTheme all hard-coded to use the Ctrl
521 // modifier, to match other platforms. In the normal case, when translating
522 // those to key sequences, we'll end up with Qt::ControlModifier+X, which is
523 // then matched against incoming key events that have been mapped from the
524 // command key to Qt::ControlModifier, and we'll get a match. If, however,
525 // the AA_MacDontSwapCtrlAndMeta application attribute is set, we need to
526 // fix the resulting key sequence so that it will match against unmapped
527 // key events that contain Qt::MetaModifier.
528 auto bindings = QPlatformTheme::keyBindings(key);
529
530 if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
531 static auto swapCtrlMeta = [](QKeyCombination keyCombination) {
532 const auto originalKeyModifiers = keyCombination.keyboardModifiers();
533 auto newKeyboardModifiers = originalKeyModifiers & ~(Qt::ControlModifier | Qt::MetaModifier);
534 if (originalKeyModifiers & Qt::ControlModifier)
535 newKeyboardModifiers |= Qt::MetaModifier;
536 if (originalKeyModifiers & Qt::MetaModifier)
537 newKeyboardModifiers |= Qt::ControlModifier;
538 return QKeyCombination(newKeyboardModifiers, keyCombination.key());
539 };
540
541 QList<QKeySequence> swappedBindings;
542 for (auto binding : bindings) {
543 Q_ASSERT(binding.count() == 1);
544 swappedBindings.append(QKeySequence(swapCtrlMeta(binding[0])));
545 }
546
547 bindings = swappedBindings;
548 }
549
550 return bindings;
551}
552#endif
553
Helper base class for retrieving icons for files for usage by QFileIconProvider and related.
static QList< QSize > toSizeList(It i1, It i2)
\inmodule QtGui
Definition qbrush.h:30
const QColor & color() const
Returns the brush color.
Definition qbrush.h:121
\inmodule QtCore
Definition qchar.h:48
QPixmap filePixmap(const QSize &size, QIcon::Mode, QIcon::State) override
QCocoaFileIconEngine(const QFileInfo &info, QPlatformTheme::IconOptions opts)
QList< QSize > availableSizes(QIcon::Mode=QIcon::Normal, QIcon::State=QIcon::Off) override
static QList< QSize > availableIconSizes()
QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions options={}) const override
Return an icon for fileInfo, observing iconOptions.
Qt::ColorScheme colorScheme() const override
QString standardButtonText(int button) const override
Returns the text of a standard button.
QPlatformDialogHelper * createPlatformDialogHelper(DialogType dialogType) const override
QPlatformMenu * createPlatformMenu() const override
static const char * name
Definition qcocoatheme.h:44
void handleSystemThemeChange()
QPlatformMenuBar * createPlatformMenuBar() const override
QList< QKeySequence > keyBindings(QKeySequence::StandardKey key) const override
const QPalette * palette(Palette type=SystemPalette) const override
bool usePlatformNativeDialog(DialogType dialogType) const override
QKeySequence standardButtonShortcut(int button) const override
QPlatformSystemTrayIcon * createPlatformSystemTrayIcon() const override
Factory function for QSystemTrayIcon.
QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override
QVariant themeHint(ThemeHint hint) const override
const QFont * font(Font type=SystemFont) const override
QPlatformMenuItem * createPlatformMenuItem() const override
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
QColor darker(int f=200) const noexcept
Definition qcolor.cpp:2857
QColor lighter(int f=150) const noexcept
Definition qcolor.cpp:2812
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
QFont * themeFont(QPlatformTheme::Font) const
static FontSmoothing fontSmoothing()
\inmodule QtCore \reentrant
Definition qfileinfo.h:22
QString canonicalFilePath() const
Returns the canonical path including the file name, i.e.
void clear()
Definition qfont.cpp:3089
static QFontCache * instance()
Definition qfont.cpp:3052
\reentrant
Definition qfont.h:20
static QPlatformIntegration * platformIntegration()
\inmodule QtCore
Definition qhash.h:818
T value(const Key &key) const noexcept
Definition qhash.h:1044
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
Definition qhash.h:949
bool isEmpty() const noexcept
Returns true if the hash contains no items; otherwise returns false.
Definition qhash.h:926
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition qhash.h:1283
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
Mode
This enum type describes the mode for which a pixmap is intended to be used.
Definition qicon.h:22
@ Normal
Definition qicon.h:22
State
This enum describes the state for which a pixmap is intended to be used.
Definition qicon.h:23
@ Off
Definition qicon.h:23
The QKeySequence class encapsulates a key sequence as used by shortcuts.
Definition qlist.h:74
void append(parameter_type t)
Definition qlist.h:441
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2823
static constexpr QOperatingSystemVersionBase MacOSMojave
\variable QOperatingSystemVersion::MacOSMojave
static QOperatingSystemVersion current()
[0]
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
const QBrush & brush(ColorGroup cg, ColorRole cr) const
Returns the brush in the specified color group, used for the given color role.
Definition qpalette.cpp:794
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
Definition qpalette.h:66
void setBrush(ColorRole cr, const QBrush &brush)
Sets the brush for the given color role to the specified brush for all groups in the palette.
Definition qpalette.h:150
@ Inactive
Definition qpalette.h:48
@ Disabled
Definition qpalette.h:48
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...
Definition qpalette.h:145
@ HighlightedText
Definition qpalette.h:52
@ ToolTipBase
Definition qpalette.h:56
@ AlternateBase
Definition qpalette.h:54
@ ButtonText
Definition qpalette.h:51
@ WindowText
Definition qpalette.h:50
@ Highlight
Definition qpalette.h:52
@ ToolTipText
Definition qpalette.h:56
@ AccentColor
Definition qpalette.h:58
@ PlaceholderText
Definition qpalette.h:57
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
virtual QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const
virtual QVariant themeHint(ThemeHint hint) const
virtual QString standardButtonText(int button) const
Returns the text of a standard button.
ThemeHint
This enum describes the available theme hints.
\inmodule QtCore
Definition qsize.h:207
\inmodule QtCore
Definition qsize.h:25
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore
Definition qvariant.h:64
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Definition qvariant.h:531
\inmodule QtGui
Definition qwindow.h:63
EGLContext ctx
QPushButton * button
[2]
qDeleteAll(list.begin(), list.end())
rect
[4]
Combined button and popup list for selecting options.
ColorScheme
Definition qnamespace.h:49
@ CTRL
@ TabFocusListControls
Definition qnamespace.h:116
@ TabFocusAllControls
Definition qnamespace.h:117
@ TabFocusTextControls
Definition qnamespace.h:115
@ white
Definition qnamespace.h:30
@ black
Definition qnamespace.h:29
@ Key_Delete
Definition qnamespace.h:665
@ ControlModifier
@ MetaModifier
@ AA_MacDontSwapCtrlAndMeta
Definition qnamespace.h:431
static const int mac_widget_colors_count
#define MAC_PALETTE_ENTRY(pal, active, inactive)
QPixmap qt_mac_convert_iconref(const IconRef icon, int width, int height)
static QHash< QPlatformTheme::Palette, QPalette * > qt_mac_createRolePalettes()
static QT_BEGIN_NAMESPACE QPalette * qt_mac_createSystemPalette()
static QMacPaletteMap mac_widget_colors[]
#define QT_IGNORE_DEPRECATIONS(statement)
#define qApp
QBrush qt_mac_toQBrush(CGColorRef color)
QColor qt_mac_toQColor(CGColorRef color)
int qRound(qfloat16 d) noexcept
Definition qfloat16.h:281
#define qGuiApp
return ret
#define SLOT(a)
Definition qobjectdefs.h:51
#define SIGNAL(a)
Definition qobjectdefs.h:52
GLboolean GLboolean GLboolean b
GLuint64 key
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei width
GLenum type
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
GLfloat GLfloat p
[1]
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
#define QStringLiteral(str)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define sp
double qreal
Definition qtypes.h:92
QFileInfo info(fileName)
[8]
QObject::connect nullptr
widget render & pixmap
QPlatformTheme::Palette paletteRole
QMacPaletteMap(QPlatformTheme::Palette p, NSColor *a, NSColor *i)
NSColor * active
NSColor * inactive