2
* Copyright (C) 2016-2017 Canonical, Ltd.
4
* This program is free software: you can redistribute it and/or modify it under
5
* the terms of the GNU Lesser General Public License version 3, as published by
6
* the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10
* SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
#include <QtPlatformSupport/private/qgenericunixthemes_p.h>
20
class UbuntuTheme : public QGenericUnixTheme
24
: mSystemFont(QStringLiteral("Ubuntu Regular"), 10),
25
mFixedFont(QStringLiteral("Ubuntu Mono Regular"), 13)
27
mSystemFont.setStyleHint(QFont::System);
28
mFixedFont.setStyleHint(QFont::TypeWriter);
30
~UbuntuTheme() = default;
32
QVariant themeHint(ThemeHint hint) const override
35
case QPlatformTheme::SystemIconThemeName: {
36
QByteArray iconTheme = qgetenv("QTUBUNTU_ICON_THEME");
37
if (iconTheme.isEmpty()) {
38
return QStringLiteral("suru");
46
return QGenericUnixTheme::themeHint(hint);
49
const QFont *font(Font type) const override
52
case QPlatformTheme::SystemFont:
54
case QPlatformTheme::FixedFont:
62
QFont mSystemFont, mFixedFont;