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/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/qappleiconengine_p.h>
26#include <QtGui/private/qfontengine_coretext_p.h>
27#include <QtGui/private/qabstractfileiconengine_p.h>
28#include <qpa/qplatformdialoghelper.h>
29#include <qpa/qplatformintegration.h>
30#include <qpa/qplatformnativeinterface.h>
31
35#include "qcocoamessagedialog.h"
36
37#include <CoreServices/CoreServices.h>
38
40
42{
43 QColor qc;
44
45 // Standard palette initialization (copied from Qt 4 styles)
46 QBrush backgroundBrush = qt_mac_toQBrush([NSColor windowBackgroundColor]);
47 QColor background = backgroundBrush.color();
48 QColor light(background.lighter(110));
49 QColor dark(background.darker(160));
50 QColor mid(background.darker(140));
51 QPalette *palette = new QPalette(Qt::black, background, light, dark, mid, Qt::black, Qt::white);
52
53 palette->setBrush(QPalette::Window, backgroundBrush);
54
57 palette->setBrush(QPalette::Disabled, QPalette::Base, backgroundBrush);
58 QBrush textBackgroundBrush = qt_mac_toQBrush([NSColor textBackgroundColor]);
59 palette->setBrush(QPalette::Active, QPalette::Base, textBackgroundBrush);
60 palette->setBrush(QPalette::Inactive, QPalette::Base, textBackgroundBrush);
61 palette->setColor(QPalette::Disabled, QPalette::Dark, QColor(191, 191, 191));
62 palette->setColor(QPalette::Active, QPalette::Dark, QColor(191, 191, 191));
63 palette->setColor(QPalette::Inactive, QPalette::Dark, QColor(191, 191, 191));
64
65 // System palette initialization:
66 QBrush br = qt_mac_toQBrush([NSColor selectedControlColor]);
68 const auto inactiveHighlight = qt_mac_toQBrush([NSColor unemphasizedSelectedContentBackgroundColor]);
69 palette->setBrush(QPalette::Inactive, QPalette::Highlight, inactiveHighlight);
70 palette->setBrush(QPalette::Disabled, QPalette::Highlight, inactiveHighlight);
71
72 palette->setBrush(QPalette::Shadow, qt_mac_toQColor([NSColor shadowColor]));
73
74 qc = qt_mac_toQColor([NSColor controlTextColor]);
82
83 qc = qt_mac_toQColor([NSColor disabledControlTextColor]);
88
89 palette->setBrush(QPalette::ToolTipBase, qt_mac_toQBrush([NSColor controlColor]));
90
91 palette->setColor(QPalette::Normal, QPalette::Link, qt_mac_toQColor([NSColor linkColor]));
92
93 qc = qt_mac_toQColor([NSColor placeholderTextColor]);
97
98 qc = qt_mac_toQColor([NSColor controlAccentColor]);
99 palette->setColor(QPalette::Accent, qc);
100
101 return palette;
102}
103
112
113#define MAC_PALETTE_ENTRY(pal, active, inactive) \
114 QMacPaletteMap(pal, [NSColor active], [NSColor inactive])
116 MAC_PALETTE_ENTRY(QPlatformTheme::ToolButtonPalette, controlTextColor, disabledControlTextColor),
117 MAC_PALETTE_ENTRY(QPlatformTheme::ButtonPalette, controlTextColor, disabledControlTextColor),
118 MAC_PALETTE_ENTRY(QPlatformTheme::HeaderPalette, headerTextColor, disabledControlTextColor),
119 MAC_PALETTE_ENTRY(QPlatformTheme::ComboBoxPalette, controlTextColor, disabledControlTextColor),
120 MAC_PALETTE_ENTRY(QPlatformTheme::ItemViewPalette, textColor, disabledControlTextColor),
121 MAC_PALETTE_ENTRY(QPlatformTheme::MessageBoxLabelPalette, textColor, disabledControlTextColor),
122 MAC_PALETTE_ENTRY(QPlatformTheme::TabBarPalette, controlTextColor, disabledControlTextColor),
123 MAC_PALETTE_ENTRY(QPlatformTheme::LabelPalette, textColor, disabledControlTextColor),
124 MAC_PALETTE_ENTRY(QPlatformTheme::GroupBoxPalette, textColor, disabledControlTextColor),
125 MAC_PALETTE_ENTRY(QPlatformTheme::MenuPalette, controlTextColor, disabledControlTextColor),
126 MAC_PALETTE_ENTRY(QPlatformTheme::MenuBarPalette, controlTextColor, disabledControlTextColor),
127 MAC_PALETTE_ENTRY(QPlatformTheme::TextEditPalette, textColor, disabledControlTextColor),
128 MAC_PALETTE_ENTRY(QPlatformTheme::TextLineEditPalette, textColor, disabledControlTextColor)
129};
130#undef MAC_PALETTE_ENTRY
131
132static const int mac_widget_colors_count = sizeof(mac_widget_colors) / sizeof(mac_widget_colors[0]);
133
134static QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
135{
136 QHash<QPlatformTheme::Palette, QPalette*> palettes;
137 QColor qc;
138 for (int i = 0; i < mac_widget_colors_count; i++) {
140 if (mac_widget_colors[i].active) {
141 qc = qt_mac_toQColor(mac_widget_colors[i].active);
150 qc = qt_mac_toQColor(mac_widget_colors[i].inactive);
155 }
158 // Cheap approximation for NSVisualEffectView (see deprecation note for selectedMenuItemTextColor)
159 auto selectedMenuItemColor = [[NSColor controlAccentColor] highlightWithLevel:0.3];
160 pal.setBrush(QPalette::Highlight, qt_mac_toQColor(selectedMenuItemColor));
161 qc = qt_mac_toQColor([NSColor labelColor]);
163 pal.setBrush(QPalette::Text, qc);
164 qc = qt_mac_toQColor([NSColor selectedMenuItemTextColor]);
166 qc = qt_mac_toQColor([NSColor disabledControlTextColor]);
168 } else if ((mac_widget_colors[i].paletteRole == QPlatformTheme::ButtonPalette)
177 } else if (mac_widget_colors[i].paletteRole == QPlatformTheme::ItemViewPalette) {
178 NSArray<NSColor *> *baseColors = nil;
179 NSColor *activeHighlightColor = nil;
180 baseColors = [NSColor alternatingContentBackgroundColors];
181 activeHighlightColor = [NSColor selectedContentBackgroundColor];
183 qt_mac_toQBrush([NSColor unemphasizedSelectedTextColor]));
184 pal.setBrush(QPalette::Base, qt_mac_toQBrush(baseColors[0]));
187 qt_mac_toQBrush(activeHighlightColor));
189 qt_mac_toQBrush([NSColor alternateSelectedControlTextColor]));
192 } else if (mac_widget_colors[i].paletteRole == QPlatformTheme::TextEditPalette) {
193 pal.setBrush(QPalette::Active, QPalette::Base, qt_mac_toQColor([NSColor textBackgroundColor]));
200 pal.setBrush(QPalette::Active, QPalette::Base, qt_mac_toQColor([NSColor textBackgroundColor]));
203 } else if (mac_widget_colors[i].paletteRole == QPlatformTheme::LabelPalette) {
204 qc = qt_mac_toQColor([NSColor labelColor]);
206 }
207 palettes.insert(mac_widget_colors[i].paletteRole, &pal);
208 }
209 return palettes;
210}
211
212const char *QCocoaTheme::name = "cocoa";
213
215 : m_systemPalette(nullptr)
216{
218 m_appearanceObserver = QMacKeyValueObserver(NSApp, @"effectiveAppearance", [this] {
219 NSAppearance.currentAppearance = NSApp.effectiveAppearance;
221 });
222 }
223
224 m_systemColorObserver = QMacNotificationObserver(nil,
225 NSSystemColorsDidChangeNotification, [this] {
227 });
228
229 updateColorScheme();
230}
231
236
238{
239 delete m_systemPalette;
240 m_systemPalette = nullptr;
241 qDeleteAll(m_palettes);
242 m_palettes.clear();
243}
244
246{
247 reset();
248
249 updateColorScheme();
250
251 m_systemPalette = qt_mac_createSystemPalette();
252 m_palettes = qt_mac_createRolePalettes();
253
255 // Re-populate glyph caches based on the new appearance's assumed text fill color
256 QFontCache::instance()->clear();
257 }
258
259 QWindowSystemInterface::handleThemeChange<QWindowSystemInterface::SynchronousDelivery>();
260}
261
263{
264 switch (dialogType) {
269 return true;
270 default:
271 return false;
272 }
273}
274
276{
277 switch (dialogType) {
279 return new QCocoaFileDialogHelper();
281 return new QCocoaColorDialogHelper();
283 return new QCocoaFontDialogHelper();
285 return new QCocoaMessageDialog;
286 default:
287 return nullptr;
288 }
289}
290
291#ifndef QT_NO_SYSTEMTRAYICON
293{
294 return new QCocoaSystemTrayIcon;
295}
296#endif
297
299{
300 if (type == SystemPalette) {
301 if (!m_systemPalette)
302 m_systemPalette = qt_mac_createSystemPalette();
303 return m_systemPalette;
304 } else {
305 if (m_palettes.isEmpty())
306 m_palettes = qt_mac_createRolePalettes();
307 return m_palettes.value(type, nullptr);
308 }
309 return nullptr;
310}
311
313{
314 const auto *platformIntegration = QGuiApplicationPrivate::platformIntegration();
315 const auto *coreTextFontDatabase = static_cast<QCoreTextFontDatabase *>(platformIntegration->fontDatabase());
316 return coreTextFontDatabase->themeFont(type);
317}
318
321{
323 ret.fill(QColor(0, 0, 0, 0));
324
325 CGRect rect = CGRectMake(0, 0, width, height);
326
328 CGAffineTransform old_xform = CGContextGetCTM(ctx);
329 CGContextConcatCTM(ctx, CGAffineTransformInvert(old_xform));
330 CGContextConcatCTM(ctx, CGAffineTransformIdentity);
331
332 ::RGBColor b;
333 b.blue = b.green = b.red = 255*255;
334 PlotIconRefInContext(ctx, &rect, kAlignNone, kTransformNone, &b, kPlotIconRefNormalFlags, icon);
335 return ret;
336}
337
339{
340 OSType iconType = 0;
341 switch (sp) {
343 iconType = kQuestionMarkIcon;
344 break;
346 iconType = kAlertNoteIcon;
347 break;
349 iconType = kAlertCautionIcon;
350 break;
352 iconType = kAlertStopIcon;
353 break;
354 case DesktopIcon:
355 iconType = kDesktopIcon;
356 break;
357 case TrashIcon:
358 iconType = kTrashIcon;
359 break;
360 case ComputerIcon:
361 iconType = kComputerIcon;
362 break;
363 case DriveFDIcon:
364 iconType = kGenericFloppyIcon;
365 break;
366 case DriveHDIcon:
367 iconType = kGenericHardDiskIcon;
368 break;
369 case DriveCDIcon:
370 case DriveDVDIcon:
371 iconType = kGenericCDROMIcon;
372 break;
373 case DriveNetIcon:
374 iconType = kGenericNetworkIcon;
375 break;
376 case DirOpenIcon:
377 iconType = kOpenFolderIcon;
378 break;
379 case DirClosedIcon:
380 case DirLinkIcon:
381 iconType = kGenericFolderIcon;
382 break;
383 case FileLinkIcon:
384 case FileIcon:
385 iconType = kGenericDocumentIcon;
386 break;
387 default:
388 break;
389 }
390 if (iconType != 0) {
392 IconRef icon = nullptr;
393 QT_IGNORE_DEPRECATIONS(GetIconRef(kOnSystemDisk, kSystemIconsCreator, iconType, &icon));
394
395 if (icon) {
396 pixmap = qt_mac_convert_iconref(icon, size.width(), size.height());
397 QT_IGNORE_DEPRECATIONS(ReleaseIconRef(icon));
398 }
399
400 return pixmap;
401 }
402
404}
405
407{
408public:
410 QPlatformTheme::IconOptions opts) :
412
415
416protected:
418 {
420
421 NSImage *iconImage = [[NSWorkspace sharedWorkspace] iconForFile:fileInfo().canonicalFilePath().toNSString()];
422 if (!iconImage)
423 return QPixmap();
424 return qt_mac_toQPixmap(iconImage, size);
425 }
426};
427
428QIcon QCocoaTheme::fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions) const
429{
430 return QIcon(new QCocoaFileIconEngine(fileInfo, iconOptions));
431}
432
434{
435 return new QAppleIconEngine(iconName);
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 m_colorScheme;
479}
480
482{
483 NSAppearance *appearance = nil;
484 switch (scheme) {
486 appearance = [NSAppearance appearanceNamed:NSAppearanceNameDarkAqua];
487 break;
489 appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua];
490 break;
492 break;
493 }
494 if (appearance != NSApp.effectiveAppearance)
495 NSApplication.sharedApplication.appearance = appearance;
496}
497
498/*
499 Update the theme's color scheme based on the current appearance.
500
501 We can only reference the appearance on the main thread, but the
502 CoreText font engine needs to know the color scheme, and might be
503 used from secondary threads, so we cache the color scheme.
504*/
505void QCocoaTheme::updateColorScheme()
506{
507 m_colorScheme = qt_mac_applicationIsInDarkMode() ? Qt::ColorScheme::Dark : Qt::ColorScheme::Light;
508}
509
516
518{
520 : QPlatformTheme::standardButtonShortcut(button);
521}
522
524{
525 auto *menuItem = new QCocoaMenuItem();
526 qCDebug(lcQpaMenus) << "Created" << menuItem;
527 return menuItem;
528}
529
531{
532 auto *menu = new QCocoaMenu();
533 qCDebug(lcQpaMenus) << "Created" << menu;
534 return menu;
535}
536
538{
539 static bool haveMenubar = false;
540 if (!haveMenubar) {
541 haveMenubar = true;
542 QObject::connect(qGuiApp, SIGNAL(focusWindowChanged(QWindow*)),
544 SLOT(onAppFocusWindowChanged(QWindow*)));
545 }
546
547 auto *menuBar = new QCocoaMenuBar();
548 qCDebug(lcQpaMenus) << "Created" << menuBar;
549 return menuBar;
550}
551
552#ifndef QT_NO_SHORTCUT
554{
555 // The default key bindings in QPlatformTheme all hard-coded to use the Ctrl
556 // modifier, to match other platforms. In the normal case, when translating
557 // those to key sequences, we'll end up with Qt::ControlModifier+X, which is
558 // then matched against incoming key events that have been mapped from the
559 // command key to Qt::ControlModifier, and we'll get a match. If, however,
560 // the AA_MacDontSwapCtrlAndMeta application attribute is set, we need to
561 // fix the resulting key sequence so that it will match against unmapped
562 // key events that contain Qt::MetaModifier.
563 auto bindings = QPlatformTheme::keyBindings(key);
564
565 if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
566 static auto swapCtrlMeta = [](QKeyCombination keyCombination) {
567 const auto originalKeyModifiers = keyCombination.keyboardModifiers();
568 auto newKeyboardModifiers = originalKeyModifiers & ~(Qt::ControlModifier | Qt::MetaModifier);
569 if (originalKeyModifiers & Qt::ControlModifier)
570 newKeyboardModifiers |= Qt::MetaModifier;
571 if (originalKeyModifiers & Qt::MetaModifier)
572 newKeyboardModifiers |= Qt::ControlModifier;
573 return QKeyCombination(newKeyboardModifiers, keyCombination.key());
574 };
575
576 QList<QKeySequence> swappedBindings;
577 for (auto binding : bindings) {
578 Q_ASSERT(binding.count() == 1);
579 swappedBindings.append(QKeySequence(swapCtrlMeta(binding[0])));
580 }
581
582 bindings = swappedBindings;
583 }
584
585 return bindings;
586}
587#endif
588
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
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:3336
\reentrant
Definition qfont.h:22
static QPlatformIntegration * platformIntegration()
T value(const Key &key) const noexcept
Definition qhash.h:1054
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:951
bool isEmpty() const noexcept
Returns true if the hash contains no items; otherwise returns false.
Definition qhash.h:928
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
static Q_CORE_EXPORT QOperatingSystemVersionBase current()
static constexpr QOperatingSystemVersionBase MacOSMojave
\variable QOperatingSystemVersion::MacOSMojave
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:536
\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