aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2/ios/qquickiostheme_p.h
diff options
context:
space:
mode:
authorDoris Verria <doris.verria@qt.io>2022-03-17 14:03:21 +0100
committerDoris Verria <doris.verria@qt.io>2022-03-18 11:01:37 +0100
commitf7e25c78d461a28b3116cbe25432b5755842a3e3 (patch)
tree94e173bc86d6eb76e11a4277c885f2a2d19b1b71 /src/quickcontrols2/ios/qquickiostheme_p.h
parentd469c6c0d639813a195fcca389f44fca8acecbe7 (diff)
iOS Style: Add QQuickIOSTheme
Add QQuickIOSTheme to initialize the QQuickTheme and set a palette with the appropriate colors for the iOS style. Use the UIKit's API to get correct colors in iOS, but hardcode them for macOS, just so we can keep compiling the iOS style on macOS too. Note: Ideally, we would use the QPlatformTheme (QIOSTheme) to do this, but we use a fusion style palette in there because we use the Fusion style on iOS for widget applications. In the future, we could revisit this and set a "native-looking" palette to the QIOSTheme, like we are doing now for the QQuickIOSTheme. Change-Id: I661ffe5ac3d57b750994f7b46abb9502fd311f44 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quickcontrols2/ios/qquickiostheme_p.h')
-rw-r--r--src/quickcontrols2/ios/qquickiostheme_p.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/quickcontrols2/ios/qquickiostheme_p.h b/src/quickcontrols2/ios/qquickiostheme_p.h
new file mode 100644
index 0000000000..ca75c55c20
--- /dev/null
+++ b/src/quickcontrols2/ios/qquickiostheme_p.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKIOSTHEME_P_H
+#define QQUICKIOSTHEME_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickTheme;
+
+class QQuickIOSTheme
+{
+public:
+ static void initialize(QQuickTheme *theme);
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKIOSTHEME_P_H