-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhintsettings.cpp
48 lines (40 loc) · 1.24 KB
/
hintsettings.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "hintsettings.h"
#include <QDebug>
#include <QDir>
#include <QString>
#include <QFileInfo>
#include <QToolBar>
#include <QPalette>
#include <QToolButton>
#include <QMainWindow>
#include <QApplication>
#include <QGuiApplication>
#include <QDialogButtonBox>
#include <QScreen>
#include <QStandardPaths>
#include <QTemporaryFile>
#include <QDBusArgument>
#include <QDBusConnection>
#include <QDBusInterface>
HintsSettings::HintsSettings(QObject *parent)
: QObject(parent)
{
m_hints[QPlatformTheme::SystemIconThemeName] = "Lucia";
m_hints[QPlatformTheme::StyleNames] = "panda";
m_hints[QPlatformTheme::SystemIconFallbackThemeName] = QStringLiteral("hicolor");
m_hints[QPlatformTheme::IconThemeSearchPaths] = xdgIconThemePaths();
}
HintsSettings::~HintsSettings()
{
}
QStringList HintsSettings::xdgIconThemePaths() const
{
QStringList paths;
// make sure we have ~/.local/share/icons in paths if it exists
paths << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("icons"), QStandardPaths::LocateDirectory);
const QFileInfo homeIconDir(QDir::homePath() + QStringLiteral("/.icons"));
if (homeIconDir.isDir()) {
paths << homeIconDir.absoluteFilePath();
}
return paths;
}