Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickstyleconstants.mm
Go to the documentation of this file.
1// Copyright (C) 2025 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
5
6#include <QtCore/private/qcore_mac_p.h>
7#include <QtGui/private/qcoregraphics_p.h>
8
9#include <AppKit/AppKit.h>
10
12
13using namespace Qt::StringLiterals;
14
15QQuickStyleConstants::QQuickStyleConstants()
16{
17}
18
19bool QQuickStyleConstants::runningWithLiquidGlass() const
20{
21 return qt_apple_runningWithLiquidGlass();
22}
23
24QColor QQuickStyleConstants::secondarySystemFillColor() const
25{
26 if (@available(macOS 14.0, *))
27 return qt_mac_toQBrush([NSColor secondarySystemFillColor]).color();
28 return Qt::black;
29}
30
31QColor QQuickStyleConstants::tertiarySystemFillColor() const
32{
33 if (@available(macOS 14.0, *))
34 return qt_mac_toQBrush([NSColor tertiarySystemFillColor]).color();
35 return Qt::black;
36}
37
38QT_END_NAMESPACE
39
40#include "moc_qquickstyleconstants.cpp"