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#ifndef QGTK3THEME_H
5#define QGTK3THEME_H
6
7#include <private/qtguiglobal_p.h>
8#include <private/qgnometheme_p.h>
9#include "qgtk3storage_p.h"
10
11QT_BEGIN_NAMESPACE
12
13class QGtk3Theme : public QGnomeTheme
14{
15public:
16 QGtk3Theme();
17
18 virtual QVariant themeHint(ThemeHint hint) const override;
19 virtual QString gtkFontName() const override;
20
21 Qt::ColorScheme colorScheme() const override;
22 void requestColorScheme(Qt::ColorScheme scheme) override;
23
24 bool usePlatformNativeDialog(DialogType type) const override;
25 QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const override;
26
27 const QPalette *palette(Palette type = SystemPalette) const override;
28 const QFont *font(Font type = SystemFont) const override;
29 QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override;
30 QIcon fileIcon(const QFileInfo &fileInfo,
31 QPlatformTheme::IconOptions iconOptions = { }) const override;
32
33 static const char *name;
34
35private:
36#if QT_CONFIG(dbus)
37 void updateColorScheme(Qt::ColorScheme) override;
38#endif // QT_CONFIG(dbus)
39 static bool useNativeFileDialog();
40 std::unique_ptr<QGtk3Storage> m_storage;
41};
42
43QT_END_NAMESPACE
44
45#endif // QGTK3THEME_H
46

source code of qtbase/src/plugins/platformthemes/gtk3/qgtk3theme.h