Compare commits
4
Commits
v2.2.0
..
3e34afe8a1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e34afe8a1 | ||
|
|
a9f7d9c770 | ||
|
|
5d85acecf4 | ||
|
|
2dfbd29ed1
|
@@ -24,7 +24,7 @@ jobs:
|
|||||||
SHA256=$(sha256sum source.tar.gz | awk '{print $1}')
|
SHA256=$(sha256sum source.tar.gz | awk '{print $1}')
|
||||||
|
|
||||||
cat << 'EOF' > PKGBUILD
|
cat << 'EOF' > PKGBUILD
|
||||||
# Maintainer: Uyanide <me@uyani.de>
|
# Maintainer: Uyanide <pywang0608@foxmail.com>
|
||||||
pkgname=wallreel
|
pkgname=wallreel
|
||||||
pkgver=${{ env.VERSION }}
|
pkgver=${{ env.VERSION }}
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
@@ -34,6 +34,7 @@ jobs:
|
|||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('qt6-base' 'qt6-declarative' 'gcc-libs' 'glibc')
|
depends=('qt6-base' 'qt6-declarative' 'gcc-libs' 'glibc')
|
||||||
makedepends=('cmake')
|
makedepends=('cmake')
|
||||||
|
optdepends=('qqc2-desktop-style: native Plasma look and feel')
|
||||||
options=('!debug')
|
options=('!debug')
|
||||||
source=("${pkgname}-${pkgver}.tar.gz::https://git.uyani.de/Uyanide/WallReel/archive/v${pkgver}.tar.gz")
|
source=("${pkgname}-${pkgver}.tar.gz::https://git.uyani.de/Uyanide/WallReel/archive/v${pkgver}.tar.gz")
|
||||||
sha256sums=('INSERT_SHA256_HERE')
|
sha256sums=('INSERT_SHA256_HERE')
|
||||||
@@ -150,7 +151,7 @@ jobs:
|
|||||||
cd aur-repo
|
cd aur-repo
|
||||||
|
|
||||||
cat << 'EOF' > LICENSE
|
cat << 'EOF' > LICENSE
|
||||||
Copyright (C) 2026 by Uyanide me@uyani.de
|
Copyright (C) 2026 by Uyanide pywang0608@foxmail.com
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
|
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2026 Uyanide me@uyani.de
|
Copyright 2026 Uyanide pywang0608@foxmail.com
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#ifndef WALLREEL_CONFIG_DATA_HPP
|
#ifndef WALLREEL_CONFIG_DATA_HPP
|
||||||
#define WALLREEL_CONFIG_DATA_HPP
|
#define WALLREEL_CONFIG_DATA_HPP
|
||||||
|
|
||||||
#include <qtmetamacros.h>
|
|
||||||
|
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef WALLREEL_CONFIGMGR_HPP
|
#ifndef WALLREEL_CONFIG_MANAGER_HPP
|
||||||
#define WALLREEL_CONFIGMGR_HPP
|
#define WALLREEL_CONFIG_MANAGER_HPP
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
@@ -106,4 +106,4 @@ class Manager : public QObject {
|
|||||||
|
|
||||||
} // namespace WallReel::Core::Config
|
} // namespace WallReel::Core::Config
|
||||||
|
|
||||||
#endif // WALLREEL_CONFIGMGR_HPP
|
#endif // WALLREEL_CONFIG_MANAGER_HPP
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef WALLREEL_IMAGEDATA_HPP
|
#ifndef WALLREEL_IMAGE_DATA_HPP
|
||||||
#define WALLREEL_IMAGEDATA_HPP
|
#define WALLREEL_IMAGE_DATA_HPP
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
@@ -106,4 +106,4 @@ class Data {
|
|||||||
|
|
||||||
} // namespace WallReel::Core::Image
|
} // namespace WallReel::Core::Image
|
||||||
|
|
||||||
#endif // WALLREEL_IMAGEDATA_HPP
|
#endif // WALLREEL_IMAGE_DATA_HPP
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef WALLREEL_IMAGEMANAGER_HPP
|
#ifndef WALLREEL_IMAGE_MANAGER_HPP
|
||||||
#define WALLREEL_IMAGEMANAGER_HPP
|
#define WALLREEL_IMAGE_MANAGER_HPP
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -96,4 +96,4 @@ class Manager : public QObject {
|
|||||||
|
|
||||||
} // namespace WallReel::Core::Image
|
} // namespace WallReel::Core::Image
|
||||||
|
|
||||||
#endif // WALLREEL_IMAGEMANAGER_HPP
|
#endif // WALLREEL_IMAGE_MANAGER_HPP
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef WALLREEL_IMAGEMODEL_HPP
|
#ifndef WALLREEL_IMAGE_MODEL_HPP
|
||||||
#define WALLREEL_IMAGEMODEL_HPP
|
#define WALLREEL_IMAGE_MODEL_HPP
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QSortFilterProxyModel>
|
#include <QSortFilterProxyModel>
|
||||||
@@ -78,10 +78,10 @@ class ProxyModel : public QSortFilterProxyModel {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_searchText;
|
QString m_searchText;
|
||||||
Config::SortType m_sortType;
|
Config::SortType m_sortType = Config::SortType::Date;
|
||||||
bool m_sortDescending;
|
bool m_sortDescending = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace WallReel::Core::Image
|
} // namespace WallReel::Core::Image
|
||||||
|
|
||||||
#endif // WALLREEL_IMAGEMODEL_HPP
|
#endif // WALLREEL_IMAGE_MODEL_HPP
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#ifndef WALLREEL_PALETTE_DATA_HPP
|
#ifndef WALLREEL_PALETTE_DATA_HPP
|
||||||
#define WALLREEL_PALETTE_DATA_HPP
|
#define WALLREEL_PALETTE_DATA_HPP
|
||||||
|
|
||||||
#include <qcolor.h>
|
|
||||||
|
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef WALLREEL_CORE_PALETTE_DOMCOLOR_HPP
|
#ifndef WALLREEL_PALETTE_DOMCOLOR_HPP
|
||||||
#define WALLREEL_CORE_PALETTE_DOMCOLOR_HPP
|
#define WALLREEL_PALETTE_DOMCOLOR_HPP
|
||||||
|
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ QColor getDominantColor(const QImage& image);
|
|||||||
|
|
||||||
} // namespace WallReel::Core::Palette
|
} // namespace WallReel::Core::Palette
|
||||||
|
|
||||||
#endif // WALLREEL_CORE_PALETTE_DOMCOLOR_HPP
|
#endif // WALLREEL_PALETTE_DOMCOLOR_HPP
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
#include "manager.hpp"
|
#include "manager.hpp"
|
||||||
|
|
||||||
#include <qcontainerfwd.h>
|
|
||||||
|
|
||||||
#include "Palette/matchcolor.hpp"
|
#include "Palette/matchcolor.hpp"
|
||||||
#include "Utils/misc.hpp"
|
#include "Utils/misc.hpp"
|
||||||
#include "logger.hpp"
|
#include "logger.hpp"
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#ifndef WALLREEL_PALETTE_MANAGER_HPP
|
#ifndef WALLREEL_PALETTE_MANAGER_HPP
|
||||||
#define WALLREEL_PALETTE_MANAGER_HPP
|
#define WALLREEL_PALETTE_MANAGER_HPP
|
||||||
|
|
||||||
#include <qcolor.h>
|
|
||||||
|
|
||||||
#include "Config/data.hpp"
|
#include "Config/data.hpp"
|
||||||
#include "Image/manager.hpp"
|
#include "Image/manager.hpp"
|
||||||
#include "data.hpp"
|
#include "data.hpp"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef WALLREEL_CORE_PALETTE_MATCHCOLOR_HPP
|
#ifndef WALLREEL_PALETTE_MATCHCOLOR_HPP
|
||||||
#define WALLREEL_CORE_PALETTE_MATCHCOLOR_HPP
|
#define WALLREEL_PALETTE_MATCHCOLOR_HPP
|
||||||
|
|
||||||
#include "data.hpp"
|
#include "data.hpp"
|
||||||
|
|
||||||
@@ -16,4 +16,4 @@ ColorItem bestMatch(const QColor& target, const QList<ColorItem>& candidates);
|
|||||||
|
|
||||||
} // namespace WallReel::Core::Palette
|
} // namespace WallReel::Core::Palette
|
||||||
|
|
||||||
#endif // WALLREEL_CORE_PALETTE_MATCHCOLOR_HPP
|
#endif // WALLREEL_PALETTE_MATCHCOLOR_HPP
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#include "Service/wallpaper.hpp"
|
#include "Service/wallpaper.hpp"
|
||||||
|
|
||||||
#include <qprocess.h>
|
|
||||||
|
|
||||||
#include <QColor>
|
|
||||||
|
|
||||||
#include "logger.hpp"
|
#include "logger.hpp"
|
||||||
|
|
||||||
WALLREEL_DECLARE_SENDER("WallpaperService")
|
WALLREEL_DECLARE_SENDER("WallpaperService")
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef WALLREEL_WALLPAPERSERVICE_HPP
|
#ifndef WALLREEL_SERVICE_WALLPAPER_HPP
|
||||||
#define WALLREEL_WALLPAPERSERVICE_HPP
|
#define WALLREEL_SERVICE_WALLPAPER_HPP
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
@@ -38,4 +38,4 @@ class WallpaperService : public QObject {
|
|||||||
|
|
||||||
} // namespace WallReel::Core::Service
|
} // namespace WallReel::Core::Service
|
||||||
|
|
||||||
#endif // WALLREEL_WALLPAPERSERVICE_HPP
|
#endif // WALLREEL_SERVICE_WALLPAPER_HPP
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef WALLREEL_MISC_HPP
|
#ifndef WALLREEL_UTILS_MISC_HPP
|
||||||
#define WALLREEL_MISC_HPP
|
#define WALLREEL_UTILS_MISC_HPP
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
@@ -199,4 +199,4 @@ inline void printPath(const QString& path, std::FILE* out = stdout) {
|
|||||||
|
|
||||||
} // namespace WallReel::Core::Utils
|
} // namespace WallReel::Core::Utils
|
||||||
|
|
||||||
#endif // WALLREEL_MISC_HPP
|
#endif // WALLREEL_UTILS_MISC_HPP
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef TEXTTEMPLATE_HPP
|
#ifndef WALLREEL_UTILS_TEXTTEMPLATE_HPP
|
||||||
#define TEXTTEMPLATE_HPP
|
#define WALLREEL_UTILS_TEXTTEMPLATE_HPP
|
||||||
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
@@ -139,4 +139,4 @@ inline QStringList extractTemplateKeys(const QString& templateStr) {
|
|||||||
|
|
||||||
} // namespace WallReel::Core::Utils
|
} // namespace WallReel::Core::Utils
|
||||||
|
|
||||||
#endif // TEXTTEMPLATE_HPP
|
#endif // WALLREEL_UTILS_TEXTTEMPLATE_HPP
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#ifndef WALLREEL_CORE_APPOPTIONS_HPP
|
||||||
|
#define WALLREEL_CORE_APPOPTIONS_HPP
|
||||||
|
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@@ -36,3 +37,5 @@ class AppOptions {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace WallReel::Core
|
} // namespace WallReel::Core
|
||||||
|
|
||||||
|
#endif // WALLREEL_CORE_APPOPTIONS_HPP
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#ifndef WALLREEL_LOGGER_HPP
|
#ifndef WALLREEL_LOGGER_HPP
|
||||||
#define WALLREEL_LOGGER_HPP
|
#define WALLREEL_LOGGER_HPP
|
||||||
|
|
||||||
#include <qcontainerfwd.h>
|
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|||||||
+31
-3
@@ -1,8 +1,8 @@
|
|||||||
#include <qobject.h>
|
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QFileInfo>
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
#include <QQmlContext>
|
#include <QQmlContext>
|
||||||
|
#include <QQuickStyle>
|
||||||
#include <QSocketNotifier>
|
#include <QSocketNotifier>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -21,6 +21,26 @@ using namespace WallReel::Core;
|
|||||||
|
|
||||||
WALLREEL_DECLARE_SENDER("Main")
|
WALLREEL_DECLARE_SENDER("Main")
|
||||||
|
|
||||||
|
static QString pickControlsStyle(const QQmlApplicationEngine& engine) {
|
||||||
|
// Respect env
|
||||||
|
if (!qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE"))
|
||||||
|
return {};
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
||||||
|
using namespace Qt::StringLiterals;
|
||||||
|
// Prefer KDE style if available,
|
||||||
|
for (const QString& p : engine.importPathList())
|
||||||
|
if (QFileInfo::exists(p + u"/org/kde/desktop/qmldir"_s))
|
||||||
|
return u"org.kde.desktop"_s;
|
||||||
|
// fallback to Fusion
|
||||||
|
return u"Fusion"_s;
|
||||||
|
#else
|
||||||
|
for (const QString& p : engine.importPathList())
|
||||||
|
if (QFileInfo::exists(p + u"/org/kde/desktop/qmldir"_qs))
|
||||||
|
return u"org.kde.desktop"_qs;
|
||||||
|
return u"Fusion"_qs;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
// Destruction order after QApplication quits its event loop:
|
// Destruction order after QApplication quits its event loop:
|
||||||
// 1. QQmlApplicationEngine (with all QML objects)
|
// 1. QQmlApplicationEngine (with all QML objects)
|
||||||
@@ -46,12 +66,14 @@ int main(int argc, char* argv[]) {
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setApplicationName(APP_NAME);
|
a.setApplicationName(APP_NAME);
|
||||||
a.setApplicationVersion(APP_VERSION);
|
a.setApplicationVersion(APP_VERSION);
|
||||||
|
{
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
||||||
using namespace Qt::StringLiterals;
|
using namespace Qt::StringLiterals;
|
||||||
a.setWindowIcon(QIcon(u":/icon.svg"_s));
|
a.setWindowIcon(QIcon(u":/icon.svg"_s));
|
||||||
#else
|
#else
|
||||||
a.setWindowIcon(QIcon(u":/%1.svg"_qs.arg(APP_NAME)));
|
a.setWindowIcon(QIcon(u":/icon.svg"_qs));
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
Logger::init();
|
Logger::init();
|
||||||
@@ -105,6 +127,10 @@ int main(int argc, char* argv[]) {
|
|||||||
{
|
{
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
|
|
||||||
|
if (const QString s = pickControlsStyle(engine); !s.isEmpty()) {
|
||||||
|
QQuickStyle::setStyle(s);
|
||||||
|
}
|
||||||
|
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
&engine,
|
&engine,
|
||||||
&QQmlApplicationEngine::objectCreationFailed,
|
&QQmlApplicationEngine::objectCreationFailed,
|
||||||
@@ -112,6 +138,7 @@ int main(int argc, char* argv[]) {
|
|||||||
[]() { QCoreApplication::exit(-1); },
|
[]() { QCoreApplication::exit(-1); },
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
|
|
||||||
|
{
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||||
using namespace Qt::StringLiterals;
|
using namespace Qt::StringLiterals;
|
||||||
engine.loadFromModule(UIMODULE_URI, u"Main"_s);
|
engine.loadFromModule(UIMODULE_URI, u"Main"_s);
|
||||||
@@ -119,6 +146,7 @@ int main(int argc, char* argv[]) {
|
|||||||
engine.addImportPath(u"qrc:/"_qs);
|
engine.addImportPath(u"qrc:/"_qs);
|
||||||
engine.load(QUrl(u"qrc:/WallReel/UI/Main.qml"_qs));
|
engine.load(QUrl(u"qrc:/WallReel/UI/Main.qml"_qs));
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
bootstrap.start();
|
bootstrap.start();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user