Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
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/QVariant>
9
11#include "qcocoamenuitem.h"
12#include "qcocoamenu.h"
13#include "qcocoamenubar.h"
14#include "qcocoahelpers.h"
15
16#include <QtCore/qfileinfo.h>
17#include <QtCore/private/qcore_mac_p.h>
18#include <QtGui/private/qfont_p.h>
19#include <QtGui/private/qguiapplication_p.h>
20#include <QtGui/private/qcoregraphics_p.h>
21#include <QtGui/qpainter.h>
22#include <QtGui/qtextformat.h>
23#include <QtGui/private/qcoretextfontdatabase_p.h>
24#include <QtGui/private/qappleiconengine_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::Accent, qc);
99
100 return palette;
101}
102
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
133static QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
134{
135 QHash<QPlatformTheme::Palette, QPalette*> palettes;
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{
216 m_appearanceObserver = QMacKeyValueObserver(NSApp, @"effectiveAppearance", [this] {
217 NSAppearance.currentAppearance = NSApp.effectiveAppearance;
219 });
220
221 m_systemColorObserver = QMacNotificationObserver(nil,
222 NSSystemColorsDidChangeNotification, [this] {
224 });
225
226 updateColorScheme();
227}
228
233
235{
236 delete m_systemPalette;
237 m_systemPalette = nullptr;
238 qDeleteAll(m_palettes);
239 m_palettes.clear();
240}
241
243{
244 reset();
245
246 updateColorScheme();
247
248 m_systemPalette = qt_mac_createSystemPalette();
249 m_palettes = qt_mac_createRolePalettes();
250
252 // Re-populate glyph caches based on the new appearance's assumed text fill color
253 QFontCache::instance()->clear();
254 }
255
256 QWindowSystemInterface::handleThemeChange<QWindowSystemInterface::SynchronousDelivery>();
257}
258
260{
261 switch (dialogType) {
266 return true;
267 default:
268 return false;
269 }
270}
271
273{
274 switch (dialogType) {
276 return new QCocoaFileDialogHelper();
278 return new QCocoaColorDialogHelper();
280 return new QCocoaFontDialogHelper();
282 return new QCocoaMessageDialog;
283 default:
284 return nullptr;
285 }
286}
287
288#ifndef QT_NO_SYSTEMTRAYICON
290{
291 return new QCocoaSystemTrayIcon;
292}
293#endif
294
296{
297 if (type == SystemPalette) {
298 if (!m_systemPalette)
299 m_systemPalette = qt_mac_createSystemPalette();
300 return m_systemPalette;
301 } else {
302 if (m_palettes.isEmpty())
303 m_palettes = qt_mac_createRolePalettes();
304 return m_palettes.value(type, nullptr);
305 }
306 return nullptr;
307}
308
310{
311 const auto *platformIntegration = QGuiApplicationPrivate::platformIntegration();
312 const auto *coreTextFontDatabase = static_cast<QCoreTextFontDatabase *>(platformIntegration->fontDatabase());
313 return coreTextFontDatabase->themeFont(type);
314}
315
318{
320 ret.fill(QColor(0, 0, 0, 0));
321
322 CGRect rect = CGRectMake(0, 0, width, height);
323
325 CGAffineTransform old_xform = CGContextGetCTM(ctx);
326 CGContextConcatCTM(ctx, CGAffineTransformInvert(old_xform));
327 CGContextConcatCTM(ctx, CGAffineTransformIdentity);
328
329 ::RGBColor b;
330 b.blue = b.green = b.red = 255*255;
331 PlotIconRefInContext(ctx, &rect, kAlignNone, kTransformNone, &b, kPlotIconRefNormalFlags, icon);
332 return ret;
333}
334
336{
337 OSType iconType = 0;
338 switch (sp) {
340 iconType = kQuestionMarkIcon;
341 break;
343 iconType = kAlertNoteIcon;
344 break;
346 iconType = kAlertCautionIcon;
347 break;
349 iconType = kAlertStopIcon;
350 break;
351 case DesktopIcon:
352 iconType = kDesktopIcon;
353 break;
354 case TrashIcon:
355 iconType = kTrashIcon;
356 break;
357 case ComputerIcon:
358 iconType = kComputerIcon;
359 break;
360 case DriveFDIcon:
361 iconType = kGenericFloppyIcon;
362 break;
363 case DriveHDIcon:
364 iconType = kGenericHardDiskIcon;
365 break;
366 case DriveCDIcon:
367 case DriveDVDIcon:
368 iconType = kGenericCDROMIcon;
369 break;
370 case DriveNetIcon:
371 iconType = kGenericNetworkIcon;
372 break;
373 case DirOpenIcon:
374 iconType = kOpenFolderIcon;
375 break;
376 case DirClosedIcon:
377 case DirLinkIcon:
378 iconType = kGenericFolderIcon;
379 break;
380 case FileLinkIcon:
381 case FileIcon:
382 iconType = kGenericDocumentIcon;
383 break;
384 default:
385 break;
386 }
387 if (iconType != 0) {
389 IconRef icon = nullptr;
390 QT_IGNORE_DEPRECATIONS(GetIconRef(kOnSystemDisk, kSystemIconsCreator, iconType, &icon));
391
392 if (icon) {
393 pixmap = qt_mac_convert_iconref(icon, size.width(), size.height());
394 QT_IGNORE_DEPRECATIONS(ReleaseIconRef(icon));
395 }
396
397 return pixmap;
398 }
399
401}
402
404{
405public:
407 QPlatformTheme::IconOptions opts) :
409
412
413protected:
415 {
417
418 NSImage *iconImage = [[NSWorkspace sharedWorkspace] iconForFile:fileInfo().canonicalFilePath().toNSString()];
419 if (!iconImage)
420 return QPixmap();
421 return qt_mac_toQPixmap(iconImage, size);
422 }
423};
424
425QIcon QCocoaTheme::fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions) const
426{
427 return QIcon(new QCocoaFileIconEngine(fileInfo, iconOptions));
428}
429
431{
432 return new QAppleIconEngine(iconName);
433}
434
436{
437 switch (hint) {
439 return QStringList(QStringLiteral("macOS"));
442 case KeyboardScheme:
443 return QVariant(int(MacKeyboardScheme));
444 case TabFocusBehavior:
445 return QVariant([[NSApplication sharedApplication] isFullKeyboardAccessEnabled] ?
447 case IconPixmapSizes:
450 return QVariant(QChar(0x2022));
452 return QVariant(int(HoverEffect));
456 return false;
458 return !NSScreen.screensHaveSeparateSpaces;
460 return false;
462 return NSEvent.doubleClickInterval * 1000;
464 return NSEvent.keyRepeatDelay * 1000;
466 return 1.0 / NSEvent.keyRepeatInterval;
468 return false;
469 default:
470 break;
471 }
473}
474
476{
477 return m_colorScheme;
478}
479
481{
482 NSAppearance *appearance = nil;
483 switch (scheme) {
485 appearance = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
486 break;
488 appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua];
489 break;
491 break;
492 }
493 if (appearance != NSApp.effectiveAppearance)
494 NSApplication.sharedApplication.appearance = appearance;
495}
496
497/*
498 Update the theme's color scheme based on the current appearance.
499
500 We can only reference the appearance on the main thread, but the
501 CoreText font engine needs to know the color scheme, and might be
502 used from secondary threads, so we cache the color scheme.
503*/
504void QCocoaTheme::updateColorScheme()
505{
506 m_colorScheme = qt_mac_applicationIsInDarkMode() ? Qt::ColorScheme::Dark : Qt::ColorScheme::Light;
507}
508
515
517{
519 : QPlatformTheme::standardButtonShortcut(button);
520}
521
523{
524 auto *menuItem = new QCocoaMenuItem();
525 qCDebug(lcQpaMenus) << "Created" << menuItem;
526 return menuItem;
527}
528
530{
531 auto *menu = new QCocoaMenu();
532 qCDebug(lcQpaMenus) << "Created" << menu;
533 return menu;
534}
535
537{
538 static bool haveMenubar = false;
539 if (!haveMenubar) {
540 haveMenubar = true;
541 QObject::connect(qGuiApp, SIGNAL(focusWindowChanged(QWindow*)),
543 SLOT(onAppFocusWindowChanged(QWindow*)));
544 }
545
546 auto *menuBar = new QCocoaMenuBar();
547 qCDebug(lcQpaMenus) << "Created" << menuBar;
548 return menuBar;
549}
550
551#ifndef QT_NO_SHORTCUT
553{
554 // The default key bindings in QPlatformTheme all hard-coded to use the Ctrl
555 // modifier, to match other platforms. In the normal case, when translating
556 // those to key sequences, we'll end up with Qt::ControlModifier+X, which is
557 // then matched against incoming key events that have been mapped from the
558 // command key to Qt::ControlModifier, and we'll get a match. If, however,
559 // the AA_MacDontSwapCtrlAndMeta application attribute is set, we need to
560 // fix the resulting key sequence so that it will match against unmapped
561 // key events that contain Qt::MetaModifier.
562 auto bindings = QPlatformTheme::keyBindings(key);
563
564 if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
565 static auto swapCtrlMeta = [](QKeyCombination keyCombination) {
566 const auto originalKeyModifiers = keyCombination.keyboardModifiers();
567 auto newKeyboardModifiers = originalKeyModifiers & ~(Qt::ControlModifier | Qt::MetaModifier);
568 if (originalKeyModifiers & Qt::ControlModifier)
569 newKeyboardModifiers |= Qt::MetaModifier;
570 if (originalKeyModifiers & Qt::MetaModifier)
571 newKeyboardModifiers |= Qt::ControlModifier;
572 return QKeyCombination(newKeyboardModifiers, keyCombination.key());
573 };
574
575 QList<QKeySequence> swappedBindings;
576 for (auto binding : bindings) {
577 Q_ASSERT(binding.count() == 1);
578 swappedBindings.append(QKeySequence(swapCtrlMeta(binding[0])));
579 }
580
581 bindings = swappedBindings;
582 }
583
584 return bindings;
585}
586#endif
587
Helper base class for retrieving icons for files for usage by QFileIconProvider and related.
static QList< QSize > availableIconSizes(double aspectRatio=1.0)
\inmodule QtGui
Definition qbrush.h:30
const QColor & color() const
Returns the brush color.
Definition qbrush.h:121
\inmodule QtCore
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
Returns sizes of all images that are contained in the engine for the specific mode and state.
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:45
void handleSystemThemeChange()
QIconEngine * createIconEngine(const QString &iconName) const override
Factory function for the QIconEngine used by QIcon::fromTheme().
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
void requestColorScheme(Qt::ColorScheme scheme) 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()
QString canonicalFilePath() const
Returns the file system entry's canonical path, including the entry's name, that is,...
static QFontCache * instance()
Definition qfont.cpp:3353
\reentrant
Definition qfont.h:22
static QPlatformIntegration * platformIntegration()
T value(const Key &key) const noexcept
Definition qhash.h:1055
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:952
bool isEmpty() const noexcept
Returns true if the hash contains no items; otherwise returns false.
Definition qhash.h:929
The QIconEngine class provides an abstract base class for QIcon renderers.
Definition qiconengine.h:15
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.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
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:748
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:67
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:151
@ Inactive
Definition qpalette.h:49
@ Disabled
Definition qpalette.h:49
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:146
@ HighlightedText
Definition qpalette.h:53
@ ToolTipBase
Definition qpalette.h:57
@ AlternateBase
Definition qpalette.h:55
@ ButtonText
Definition qpalette.h:52
@ WindowText
Definition qpalette.h:51
@ Highlight
Definition qpalette.h:53
@ ToolTipText
Definition qpalette.h:57
@ PlaceholderText
Definition qpalette.h:58
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:208
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
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:537
\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:50
@ CTRL
@ TabFocusListControls
Definition qnamespace.h:117
@ TabFocusAllControls
Definition qnamespace.h:118
@ TabFocusTextControls
Definition qnamespace.h:116
@ white
Definition qnamespace.h:31
@ black
Definition qnamespace.h:30
@ Key_Delete
Definition qnamespace.h:670
@ ControlModifier
@ MetaModifier
@ AA_MacDontSwapCtrlAndMeta
Definition qnamespace.h:432
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)
QList< QString > QStringList
Constructs a string list that contains the given string, str.
#define qApp
QBrush qt_mac_toQBrush(CGColorRef color)
QColor qt_mac_toQColor(CGColorRef color)
#define qGuiApp
#define qCDebug(category,...)
return ret
#define SLOT(a)
Definition qobjectdefs.h:52
#define SIGNAL(a)
Definition qobjectdefs.h:53
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
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
QObject::connect nullptr
widget render & pixmap
QMenu menu
[5]
QMenuBar * menuBar
[0]
QHostInfo info
[0]
QPlatformTheme::Palette paletteRole
QMacPaletteMap(QPlatformTheme::Palette p, NSColor *a, NSColor *i)
NSColor * active
NSColor * inactive