mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-02-02 19:27:38 +08:00
Compare commits
No commits in common. "9296b186067df903b2797726bfede7cc60d3ba39" and "44f7948df32e750a890a9375634eca39f033a5ba" have entirely different histories.
9296b18606
...
44f7948df3
@ -33,7 +33,7 @@ FluTheme::FluTheme(QObject *parent) : QObject{parent} {
|
|||||||
connect(&_watcher, &QFileSystemWatcher::fileChanged, this, [=](const QString &path){
|
connect(&_watcher, &QFileSystemWatcher::fileChanged, this, [=](const QString &path){
|
||||||
Q_EMIT desktopImagePathChanged();
|
Q_EMIT desktopImagePathChanged();
|
||||||
});
|
});
|
||||||
startTimer(1000);
|
startTimer(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FluTheme::refreshColors() {
|
void FluTheme::refreshColors() {
|
||||||
|
@ -260,30 +260,8 @@ QString FluTools::getWallpaperFilePath() {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return QString::fromWCharArray(path);
|
return QString::fromWCharArray(path);
|
||||||
#elif defined(Q_OS_LINUX)
|
|
||||||
auto type = QSysInfo::productType();
|
|
||||||
if (type == "uos") {
|
|
||||||
QProcess process;
|
|
||||||
QStringList args;
|
|
||||||
args << "--session";
|
|
||||||
args << "--type=method_call";
|
|
||||||
args << "--print-reply";
|
|
||||||
args << "--dest=com.deepin.wm";
|
|
||||||
args << "/com/deepin/wm";
|
|
||||||
args << "com.deepin.wm.GetCurrentWorkspaceBackgroundForMonitor";
|
|
||||||
args << QString("string:'%1'").arg(currentTimestamp());
|
|
||||||
process.start("dbus-send", args);
|
|
||||||
process.waitForFinished();
|
|
||||||
QByteArray result = process.readAllStandardOutput().trimmed();
|
|
||||||
int startIndex = result.indexOf("file:///");
|
|
||||||
if (startIndex != -1) {
|
|
||||||
auto path = result.mid(startIndex + 7, result.length() - startIndex - 8);
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
return {};
|
|
||||||
#endif
|
#endif
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor FluTools::imageMainColor(const QImage& image, double bright) {
|
QColor FluTools::imageMainColor(const QImage& image, double bright) {
|
||||||
|
Loading…
Reference in New Issue
Block a user