Merge branch '2209-22-0525' into 'yhkylin/v101'
Gbp-Pq: Name 0011-Merge-branch-2209-22-0525-into-yhkylin-v101.patch
This commit is contained in:
parent
de0caa1027
commit
d065de5f8c
|
@ -0,0 +1,184 @@
|
||||||
|
#include "customglobaltheme.h"
|
||||||
|
|
||||||
|
#include <QGSettings>
|
||||||
|
#include <QSettings>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
|
#include <QMetaMethod>
|
||||||
|
|
||||||
|
#define USER_THEME_DIR QString("%1/%2").arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)).arg("globaltheme/")
|
||||||
|
|
||||||
|
CustomGlobalTheme::CustomGlobalTheme(QObject *parent) : GlobalTheme(parent)
|
||||||
|
{
|
||||||
|
if (QGSettings::isSchemaInstalled("org.ukui.globaltheme.settings")) {
|
||||||
|
gsettings = new QGSettings("org.ukui.globaltheme.settings", "/org/ukui/globaltheme/settings/", this);
|
||||||
|
connect(gsettings, &QGSettings::changed, this, &CustomGlobalTheme::onGlobalSettingsChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString path = USER_THEME_DIR + "custom.conf";
|
||||||
|
qsettings = new QSettings(path, QSettings::NativeFormat, this);
|
||||||
|
qsettings->setIniCodec(QTextCodec::codecForName("utf-8"));
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getThemeName()
|
||||||
|
{
|
||||||
|
return "custom";
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getLocaleThemeName()
|
||||||
|
{
|
||||||
|
return tr("custom");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CustomGlobalTheme::getSupportLightDarkMode()
|
||||||
|
{
|
||||||
|
return qsettings->value("getSupportLightDarkMode", false).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getDefaultLightDarkMode()
|
||||||
|
{
|
||||||
|
return qsettings->value("getDefaultLightDarkMode", "light").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getWidgetStyleName()
|
||||||
|
{
|
||||||
|
return qsettings->value("getWidgetStyleName", "fashion").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getQtLightThemeName()
|
||||||
|
{
|
||||||
|
return qsettings->value("getQtLightThemeName", "ukui-light").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getQtDarkThemeName()
|
||||||
|
{
|
||||||
|
return qsettings->value("getQtDarkThemeName", "ukui-dark").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getGtkThemeName()
|
||||||
|
{
|
||||||
|
return qsettings->value("getGtkThemeName", "ukui-white").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getGtkLightThemeName()
|
||||||
|
{
|
||||||
|
return qsettings->value("getGtkLightThemeName", "ukui-white").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getGtkDarkThemeName()
|
||||||
|
{
|
||||||
|
return qsettings->value("getGtkDarkThemeName", "ukui-black").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getIconThemeName()
|
||||||
|
{
|
||||||
|
return qsettings->value("getIconThemeName", "ukui-icon-theme-default").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getCursorThemeName()
|
||||||
|
{
|
||||||
|
return qsettings->value("getCursorThemeName", "DMZ-white").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getSoundThemeName()
|
||||||
|
{
|
||||||
|
return qsettings->value("getSoundThemeName", "xunguang").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CustomGlobalTheme::getWallPaperPath()
|
||||||
|
{
|
||||||
|
return qsettings->value("getWallPaperPath").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CustomGlobalTheme::getSupportBlur()
|
||||||
|
{
|
||||||
|
return qsettings->value("getSupportBlur").toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CustomGlobalTheme::getBlurEnabled()
|
||||||
|
{
|
||||||
|
return qsettings->value("getBlurEnabled").toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CustomGlobalTheme::getSupportTransparency()
|
||||||
|
{
|
||||||
|
return qsettings->value("getSupportTransparency").toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
int CustomGlobalTheme::getTransparencyBlur()
|
||||||
|
{
|
||||||
|
return qsettings->value("getTransparencyBlur", 90).toInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
int CustomGlobalTheme::getTransparencyNoBlur()
|
||||||
|
{
|
||||||
|
return qsettings->value("getTransparencyNoBlur", 100).toInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CustomGlobalTheme::getSupportAnimation()
|
||||||
|
{
|
||||||
|
return qsettings->value("getSupportAnimation").toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
int CustomGlobalTheme::getAnimationDuration()
|
||||||
|
{
|
||||||
|
return qsettings->value("getAnimationDuration", 150).toInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CustomGlobalTheme::loadThumbnail()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QPixmap CustomGlobalTheme::getThumbnail()
|
||||||
|
{
|
||||||
|
return QPixmap();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CustomGlobalTheme::isModified()
|
||||||
|
{
|
||||||
|
if (!gsettings) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return gsettings->get("idModified").toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CustomGlobalTheme::loadFromOtherGlobalTheme(GlobalTheme *other)
|
||||||
|
{
|
||||||
|
if (other->getThemeName() == "custom")
|
||||||
|
return;
|
||||||
|
|
||||||
|
int methodCount = other->metaObject()->methodCount();
|
||||||
|
for (int i = 0; i < methodCount; i++) {
|
||||||
|
auto method = other->metaObject()->method(i);
|
||||||
|
if (method.parameterCount() > 0)
|
||||||
|
continue;
|
||||||
|
QString var;
|
||||||
|
if (other->metaObject()->invokeMethod(other, method.name().constData(), Q_RETURN_ARG(QString, var))) {
|
||||||
|
qsettings->setValue(method.name().constData(), var);
|
||||||
|
} else {
|
||||||
|
bool var;
|
||||||
|
if (other->metaObject()->invokeMethod(other, method.name().constData(), Q_RETURN_ARG(bool, var))) {
|
||||||
|
qsettings->setValue(method.name().constData(), var);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
qsettings->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CustomGlobalTheme::updateValue(const QString &functionName, const QVariant &value)
|
||||||
|
{
|
||||||
|
qsettings->setValue(functionName, value);
|
||||||
|
qsettings->sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CustomGlobalTheme::onGlobalSettingsChanged(const QString &key)
|
||||||
|
{
|
||||||
|
if (key == "isModified") {
|
||||||
|
|
||||||
|
} else if (key == "globalThemeName") {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
#ifndef CUSTOMGLOBALTHEME_H
|
||||||
|
#define CUSTOMGLOBALTHEME_H
|
||||||
|
|
||||||
|
#include "globaltheme.h"
|
||||||
|
|
||||||
|
class QGSettings;
|
||||||
|
class QSettings;
|
||||||
|
|
||||||
|
class CustomGlobalTheme : public GlobalTheme
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit CustomGlobalTheme(QObject *parent = nullptr);
|
||||||
|
|
||||||
|
QString getThemeName() override;
|
||||||
|
QString getLocaleThemeName() override;
|
||||||
|
|
||||||
|
bool getSupportLightDarkMode() override;
|
||||||
|
QString getDefaultLightDarkMode() override;
|
||||||
|
|
||||||
|
QString getWidgetStyleName() override;
|
||||||
|
QString getQtLightThemeName() override;
|
||||||
|
QString getQtDarkThemeName() override;
|
||||||
|
|
||||||
|
QString getGtkThemeName() override;
|
||||||
|
QString getGtkLightThemeName() override;
|
||||||
|
QString getGtkDarkThemeName() override;
|
||||||
|
|
||||||
|
QString getIconThemeName() override;
|
||||||
|
QString getCursorThemeName() override;
|
||||||
|
QString getSoundThemeName() override;
|
||||||
|
QString getWallPaperPath() override;
|
||||||
|
|
||||||
|
bool getSupportBlur() override;
|
||||||
|
bool getBlurEnabled() override;
|
||||||
|
|
||||||
|
bool getSupportTransparency() override;
|
||||||
|
int getTransparencyBlur() override;
|
||||||
|
int getTransparencyNoBlur() override;
|
||||||
|
|
||||||
|
bool getSupportAnimation() override;
|
||||||
|
int getAnimationDuration() override;
|
||||||
|
|
||||||
|
void loadThumbnail() override;
|
||||||
|
QPixmap getThumbnail() override;
|
||||||
|
|
||||||
|
bool isModified();
|
||||||
|
void loadFromOtherGlobalTheme(GlobalTheme *other);
|
||||||
|
void updateValue(const QString &functionName, const QVariant &value);
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
void onGlobalSettingsChanged(const QString &key);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QGSettings *gsettings = nullptr;
|
||||||
|
|
||||||
|
QSettings *qsettings = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CUSTOMGLOBALTHEME_H
|
|
@ -8,6 +8,8 @@
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
#include <QLocale>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
@ -39,10 +41,22 @@ GlobalTheme::GlobalTheme(const QString &theme, QObject *parent) : QObject(parent
|
||||||
qWarning()<<"can not find global theme"<<d_ptr->themeName;
|
qWarning()<<"can not find global theme"<<d_ptr->themeName;
|
||||||
d_ptr->settings = new QSettings(userPath, QSettings::NativeFormat, this);
|
d_ptr->settings = new QSettings(userPath, QSettings::NativeFormat, this);
|
||||||
}
|
}
|
||||||
|
d_ptr->settings->setIniCodec(QTextCodec::codecForName("utf-8"));
|
||||||
|
|
||||||
|
QVariant var;
|
||||||
|
|
||||||
|
// generic
|
||||||
|
d_ptr->settings->beginGroup("generic");
|
||||||
|
var = d_ptr->settings->value(QString("Name[%1]").arg(QLocale::system().name()));
|
||||||
|
if (var.isValid()) {
|
||||||
|
d_ptr->localeThemeName = var.toString();
|
||||||
|
} else {
|
||||||
|
d_ptr->localeThemeName = d_ptr->themeName;
|
||||||
|
}
|
||||||
|
d_ptr->settings->endGroup();
|
||||||
|
|
||||||
// color-schemes
|
// color-schemes
|
||||||
d_ptr->settings->beginGroup("color-schemes");
|
d_ptr->settings->beginGroup("color-schemes");
|
||||||
QVariant var;
|
|
||||||
var = d_ptr->settings->value("supportLightDarkMode");
|
var = d_ptr->settings->value("supportLightDarkMode");
|
||||||
if (var.isValid()) {
|
if (var.isValid()) {
|
||||||
d_ptr->supportLightDarkMode = var.toBool();
|
d_ptr->supportLightDarkMode = var.toBool();
|
||||||
|
@ -142,12 +156,23 @@ GlobalTheme::GlobalTheme(const QString &theme, QObject *parent) : QObject(parent
|
||||||
d_ptr->settings->endGroup();
|
d_ptr->settings->endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GlobalTheme::GlobalTheme(QObject *parent)
|
||||||
|
{
|
||||||
|
d_ptr = new GlobalThemePrivate;
|
||||||
|
}
|
||||||
|
|
||||||
QString GlobalTheme::getThemeName()
|
QString GlobalTheme::getThemeName()
|
||||||
{
|
{
|
||||||
Q_D(GlobalTheme);
|
Q_D(GlobalTheme);
|
||||||
return d_func()->themeName;
|
return d_func()->themeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString GlobalTheme::getLocaleThemeName()
|
||||||
|
{
|
||||||
|
Q_D(GlobalTheme);
|
||||||
|
return d_func()->localeThemeName;
|
||||||
|
}
|
||||||
|
|
||||||
bool GlobalTheme::getSupportLightDarkMode()
|
bool GlobalTheme::getSupportLightDarkMode()
|
||||||
{
|
{
|
||||||
Q_D(GlobalTheme);
|
Q_D(GlobalTheme);
|
||||||
|
|
|
@ -22,49 +22,51 @@ class GlobalTheme : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit GlobalTheme(const QString &theme, QObject *parent = nullptr);
|
explicit GlobalTheme(const QString &theme, QObject *parent = nullptr);
|
||||||
|
explicit GlobalTheme(QObject *parent = nullptr); //custom globaltheme 使用
|
||||||
|
|
||||||
QString getThemeName();
|
Q_INVOKABLE virtual QString getThemeName();
|
||||||
|
Q_INVOKABLE virtual QString getLocaleThemeName();
|
||||||
|
|
||||||
bool getSupportLightDarkMode();
|
Q_INVOKABLE virtual bool getSupportLightDarkMode();
|
||||||
QString getDefaultLightDarkMode();
|
Q_INVOKABLE virtual QString getDefaultLightDarkMode();
|
||||||
|
|
||||||
QString getWidgetStyleName();
|
Q_INVOKABLE virtual QString getWidgetStyleName();
|
||||||
QString getQtLightThemeName();
|
Q_INVOKABLE virtual QString getQtLightThemeName();
|
||||||
QString getQtDarkThemeName();
|
Q_INVOKABLE virtual QString getQtDarkThemeName();
|
||||||
|
|
||||||
QString getGtkThemeName();
|
Q_INVOKABLE virtual QString getGtkThemeName();
|
||||||
QString getGtkLightThemeName();
|
Q_INVOKABLE virtual QString getGtkLightThemeName();
|
||||||
QString getGtkDarkThemeName();
|
Q_INVOKABLE virtual QString getGtkDarkThemeName();
|
||||||
|
|
||||||
QString getIconThemeName();
|
Q_INVOKABLE virtual QString getIconThemeName();
|
||||||
QString getCursorThemeName();
|
Q_INVOKABLE virtual QString getCursorThemeName();
|
||||||
QString getSoundThemeName();
|
Q_INVOKABLE virtual QString getSoundThemeName();
|
||||||
QString getWallPaperPath();
|
Q_INVOKABLE virtual QString getWallPaperPath();
|
||||||
|
|
||||||
bool getSupportBlur();
|
Q_INVOKABLE virtual bool getSupportBlur();
|
||||||
bool getBlurEnabled();
|
Q_INVOKABLE virtual bool getBlurEnabled();
|
||||||
|
|
||||||
bool getSupportTransparency();
|
Q_INVOKABLE virtual bool getSupportTransparency();
|
||||||
int getTransparencyBlur();
|
Q_INVOKABLE virtual int getTransparencyBlur();
|
||||||
int getTransparencyNoBlur();
|
Q_INVOKABLE virtual int getTransparencyNoBlur();
|
||||||
|
|
||||||
bool getSupportAnimation();
|
Q_INVOKABLE virtual bool getSupportAnimation();
|
||||||
int getAnimationDuration();
|
Q_INVOKABLE virtual int getAnimationDuration();
|
||||||
|
|
||||||
void loadThumbnail();
|
virtual void loadThumbnail();
|
||||||
QPixmap getThumbnail();
|
virtual QPixmap getThumbnail();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief realPath
|
* \brief realPath
|
||||||
* \return 主题配置所在的路径,用这个方法可以区分是系统安装的主题还是用户安装的主题
|
* \return 主题配置所在的路径,用这个方法可以区分是系统安装的主题还是用户安装的主题
|
||||||
*/
|
*/
|
||||||
QString realPath();
|
virtual QString realPath();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void thumbnailLoaded();
|
void thumbnailLoaded();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void updateThumbnail(const QPixmap &pixmap);
|
virtual void updateThumbnail(const QPixmap &pixmap);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DECLARE_PRIVATE(GlobalTheme)
|
Q_DECLARE_PRIVATE(GlobalTheme)
|
||||||
|
|
|
@ -13,6 +13,7 @@ public:
|
||||||
GlobalThemePrivate() {}
|
GlobalThemePrivate() {}
|
||||||
|
|
||||||
QString themeName;
|
QString themeName;
|
||||||
|
QString localeThemeName;
|
||||||
|
|
||||||
bool supportLightDarkMode = true;
|
bool supportLightDarkMode = true;
|
||||||
QString defaultLightDarkMode = "light";
|
QString defaultLightDarkMode = "light";
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "globalthemehelper.h"
|
#include "globalthemehelper.h"
|
||||||
#include "globaltheme.h"
|
#include "globaltheme.h"
|
||||||
|
#include "customglobaltheme.h"
|
||||||
|
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
@ -73,6 +74,23 @@ void GlobalThemeHelper::invalidateCurrentGlobalTheme()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GlobalTheme *GlobalThemeHelper::getCustomTheme()
|
||||||
|
{
|
||||||
|
return d_func()->globalThemes.value("custom");
|
||||||
|
}
|
||||||
|
|
||||||
|
void GlobalThemeHelper::syncCustomThemeFromCurrentTheme()
|
||||||
|
{
|
||||||
|
auto customTheme = qobject_cast<CustomGlobalTheme *>(d_func()->globalThemes.value("custom"));
|
||||||
|
customTheme->loadFromOtherGlobalTheme(getCurrentGlobalTheme());
|
||||||
|
}
|
||||||
|
|
||||||
|
void GlobalThemeHelper::updateCustomThemeSetting(const QString &functionName, const QVariant &value)
|
||||||
|
{
|
||||||
|
auto customTheme = qobject_cast<CustomGlobalTheme *>(d_func()->globalThemes.value("custom"));
|
||||||
|
customTheme->updateValue(functionName, value);
|
||||||
|
}
|
||||||
|
|
||||||
void GlobalThemeHelper::loadThumbnail(GlobalTheme *theme)
|
void GlobalThemeHelper::loadThumbnail(GlobalTheme *theme)
|
||||||
{
|
{
|
||||||
auto thread = new QThread;
|
auto thread = new QThread;
|
||||||
|
@ -113,6 +131,9 @@ void GlobalThemeHelperPrivate::initThemes()
|
||||||
auto globalTheme = new GlobalTheme(theme);
|
auto globalTheme = new GlobalTheme(theme);
|
||||||
globalThemes.insert(theme, globalTheme);
|
globalThemes.insert(theme, globalTheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto customTheme = new CustomGlobalTheme;
|
||||||
|
globalThemes.insert("custom", customTheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GlobalThemeHelperPrivate::getCurrentThemeName()
|
QString GlobalThemeHelperPrivate::getCurrentThemeName()
|
||||||
|
|
|
@ -47,6 +47,27 @@ public:
|
||||||
*/
|
*/
|
||||||
void invalidateCurrentGlobalTheme();
|
void invalidateCurrentGlobalTheme();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief getCustomTheme
|
||||||
|
* \return 自定义主题
|
||||||
|
*/
|
||||||
|
GlobalTheme *getCustomTheme();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief syncCustomThemeFromCurrentTheme
|
||||||
|
* 从当前全局主题同步自定义主题,需要在切换到自定义主题之前做这一个操作
|
||||||
|
* 然后可能需要调用updateCustomThemeSetting()更新自定义的主题
|
||||||
|
*/
|
||||||
|
void syncCustomThemeFromCurrentTheme();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief updateCustomThemeSetting
|
||||||
|
* 用于更新自定义主题,key值是对应方法的name,value是需要更新的值
|
||||||
|
* \param functionName
|
||||||
|
* \param value
|
||||||
|
*/
|
||||||
|
void updateCustomThemeSetting(const QString &functionName, const QVariant &value);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief loadThumbnail
|
* \brief loadThumbnail
|
||||||
* \param theme
|
* \param theme
|
||||||
|
|
|
@ -81,4 +81,9 @@ bool PictureUnit::getClickedFlag()
|
||||||
void PictureUnit::changeClickedFlag(bool flag)
|
void PictureUnit::changeClickedFlag(bool flag)
|
||||||
{
|
{
|
||||||
clickedFlag = flag;
|
clickedFlag = flag;
|
||||||
|
if (flag) {
|
||||||
|
setStyleSheet(this->clickedStyleSheet);
|
||||||
|
} else {
|
||||||
|
setStyleSheet("border-width: 0px;");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,11 @@
|
||||||
#define PEONY_TRAN_KEY "peony-side-bar-transparency"
|
#define PEONY_TRAN_KEY "peony-side-bar-transparency"
|
||||||
#define ICON_QT_KEY "icon-theme-name"
|
#define ICON_QT_KEY "icon-theme-name"
|
||||||
#define WIDGET_QT_KEY "widget-theme-name"
|
#define WIDGET_QT_KEY "widget-theme-name"
|
||||||
|
#define COLOR_QT_KEY "theme-color"
|
||||||
|
|
||||||
|
#define GLOBAL_SCHEMA "org.ukui.globaltheme.settings"
|
||||||
|
#define GLOBAL_NAME_KEY "global-theme-name"
|
||||||
|
#define ISMODIFY_KEY "is-modified"
|
||||||
|
|
||||||
#define ICONTHEMEPATH "/usr/share/icons/"
|
#define ICONTHEMEPATH "/usr/share/icons/"
|
||||||
#define SYSTHEMEPATH "/usr/share/themes/"
|
#define SYSTHEMEPATH "/usr/share/themes/"
|
||||||
|
@ -224,11 +229,6 @@ void Theme::setupComponent() {
|
||||||
|
|
||||||
ui->darkFrame->setVisible(!Utils::isCommunity());
|
ui->darkFrame->setVisible(!Utils::isCommunity());
|
||||||
|
|
||||||
//隐藏现阶段不支持功能
|
|
||||||
ui->controlLabel->hide();
|
|
||||||
ui->controlWidget->hide();
|
|
||||||
ui->verticalSpacer_2->changeSize(0,0);
|
|
||||||
|
|
||||||
ui->defaultButton->setProperty("value", "ukui-default");
|
ui->defaultButton->setProperty("value", "ukui-default");
|
||||||
ui->defaultButton->setStyleSheet("QPushButton{color: palette(base);border-radius: 4px;}");
|
ui->defaultButton->setStyleSheet("QPushButton{color: palette(base);border-radius: 4px;}");
|
||||||
ui->lightButton->setProperty("value", "ukui-light");
|
ui->lightButton->setProperty("value", "ukui-light");
|
||||||
|
@ -244,9 +244,7 @@ void Theme::setupComponent() {
|
||||||
|
|
||||||
ui->tranSlider->setValue(static_cast<int>(personliseGsettings->get(PERSONALSIE_TRAN_KEY).toDouble() * 100.0));
|
ui->tranSlider->setValue(static_cast<int>(personliseGsettings->get(PERSONALSIE_TRAN_KEY).toDouble() * 100.0));
|
||||||
connect(ui->tranSlider, &QSlider::valueChanged, this, [=]() {
|
connect(ui->tranSlider, &QSlider::valueChanged, this, [=]() {
|
||||||
personliseGsettings->set(PERSONALSIE_TRAN_KEY,(static_cast<int>(ui->tranSlider->value()) / 100.0));
|
changeTranpancySlot(ui->tranSlider->value());
|
||||||
qtSettings->set(THEME_TRAN_KEY, ui->tranSlider->value());
|
|
||||||
qtSettings->set(PEONY_TRAN_KEY, ui->tranSlider->value());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//构建并填充特效开关按钮
|
//构建并填充特效开关按钮
|
||||||
|
@ -256,6 +254,9 @@ void Theme::setupComponent() {
|
||||||
ui->kwinFrame->setVisible(false);
|
ui->kwinFrame->setVisible(false);
|
||||||
ui->transFrame->setVisible(true);
|
ui->transFrame->setVisible(true);
|
||||||
ui->line->setVisible(true);
|
ui->line->setVisible(true);
|
||||||
|
|
||||||
|
initGlobalTheme();
|
||||||
|
initControlTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Theme::buildThemeModeBtn(QPushButton *button, QString name, QString icon){
|
void Theme::buildThemeModeBtn(QPushButton *button, QString name, QString icon){
|
||||||
|
@ -413,7 +414,7 @@ void Theme::initThemeMode() {
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(personliseGsettings, &QGSettings::changed,this,[=] (const QString &key) {
|
connect(personliseGsettings, &QGSettings::changed,this,[=] (const QString &key) {
|
||||||
if(key == "effect") {
|
if (key == "effect") {
|
||||||
bool effectEnabled = personliseGsettings->get("effect").toBool();
|
bool effectEnabled = personliseGsettings->get("effect").toBool();
|
||||||
effectSwitchBtn->setChecked(effectEnabled);
|
effectSwitchBtn->setChecked(effectEnabled);
|
||||||
}
|
}
|
||||||
|
@ -436,6 +437,7 @@ void Theme::initIconTheme() {
|
||||||
// 设置图标主题
|
// 设置图标主题
|
||||||
qtSettings->set(ICON_QT_KEY, value);
|
qtSettings->set(ICON_QT_KEY, value);
|
||||||
gtkSettings->set(ICON_GTK_KEY, value);
|
gtkSettings->set(ICON_GTK_KEY, value);
|
||||||
|
revokeGlobalThemeSlot();
|
||||||
});
|
});
|
||||||
|
|
||||||
//构建图标主题QDir
|
//构建图标主题QDir
|
||||||
|
@ -462,53 +464,70 @@ void Theme::initIconTheme() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Theme::setupControlTheme(){
|
void Theme::initControlTheme()
|
||||||
QStringList colorStringList;
|
{
|
||||||
colorStringList << QString("#3D6BE5");
|
if (!qtSettings->keys().contains("themeColor")) {
|
||||||
colorStringList << QString("#FA6C63");
|
return;
|
||||||
colorStringList << QString("#6cd472");
|
|
||||||
colorStringList << QString("#f9a959");
|
|
||||||
colorStringList << QString("#BA7Bd8");
|
|
||||||
colorStringList << QString("#F8D15D");
|
|
||||||
colorStringList << QString("#E7BBB0");
|
|
||||||
colorStringList << QString("#176F57");
|
|
||||||
|
|
||||||
QButtonGroup * colorBtnGroup = new QButtonGroup();
|
|
||||||
|
|
||||||
for (QString color : colorStringList){
|
|
||||||
|
|
||||||
QPushButton * button = new QPushButton(ui->controlWidget);
|
|
||||||
button->setFixedSize(QSize(48, 48));
|
|
||||||
button->setCheckable(true);
|
|
||||||
colorBtnGroup->addButton(button, colorStringList.indexOf(color));
|
|
||||||
|
|
||||||
QVBoxLayout * colorVerLayout = new QVBoxLayout();
|
|
||||||
colorVerLayout->setSpacing(0);
|
|
||||||
colorVerLayout->setMargin(0);
|
|
||||||
|
|
||||||
QHBoxLayout * colorHorLayout = new QHBoxLayout();
|
|
||||||
colorHorLayout->setSpacing(0);
|
|
||||||
colorHorLayout->setMargin(0);
|
|
||||||
|
|
||||||
QLabel * selectedColorLabel = new QLabel(button);
|
|
||||||
QSizePolicy scSizePolicy = selectedColorLabel->sizePolicy();
|
|
||||||
scSizePolicy.setHorizontalPolicy(QSizePolicy::Fixed);
|
|
||||||
scSizePolicy.setVerticalPolicy(QSizePolicy::Fixed);
|
|
||||||
selectedColorLabel->setSizePolicy(scSizePolicy);
|
|
||||||
selectedColorLabel->setScaledContents(true);
|
|
||||||
selectedColorLabel->setPixmap(QPixmap("://img/plugins/theme/selected.png"));
|
|
||||||
// 初始化选中图标状态
|
|
||||||
selectedColorLabel->setVisible(button->isChecked());
|
|
||||||
|
|
||||||
colorHorLayout->addStretch();
|
|
||||||
colorHorLayout->addWidget(selectedColorLabel);
|
|
||||||
colorVerLayout->addLayout(colorHorLayout);
|
|
||||||
colorVerLayout->addStretch();
|
|
||||||
|
|
||||||
button->setLayout(colorVerLayout);
|
|
||||||
|
|
||||||
ui->controlHorLayout->addWidget(button);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString colorName = qtSettings->get(COLOR_QT_KEY).toString();
|
||||||
|
|
||||||
|
mControlMap.insert("daybreakBlue", QColor(55, 144, 250));
|
||||||
|
mControlMap.insert("jamPurple", QColor(114, 46, 209));
|
||||||
|
mControlMap.insert("magenta", QColor(235, 48, 150));
|
||||||
|
mControlMap.insert("sunRed", QColor(243, 34, 45));
|
||||||
|
mControlMap.insert("sunsetOrange", QColor(246, 140, 39));
|
||||||
|
mControlMap.insert("dustGold", QColor(255, 217, 102));
|
||||||
|
mControlMap.insert("polarGreen", QColor(82, 196, 41));
|
||||||
|
|
||||||
|
|
||||||
|
mControlLabel = new TitleLabel();
|
||||||
|
mControlLabel->setMaximumWidth(100);
|
||||||
|
mControlLabel->setText(tr("Corlor"));
|
||||||
|
|
||||||
|
mControlHLyt = new QHBoxLayout();
|
||||||
|
mControlHLyt->addWidget(mControlLabel);
|
||||||
|
mControlHLyt->addSpacing(32);
|
||||||
|
|
||||||
|
mControlFrame = new QFrame(pluginWidget);
|
||||||
|
mControlFrame->setMinimumHeight(60);
|
||||||
|
mControlFrame->setFrameShape(QFrame::Shape::Box);
|
||||||
|
|
||||||
|
QMap<QString, QColor>::const_iterator it = mControlMap.constBegin();
|
||||||
|
while (it != mControlMap.constEnd()) {
|
||||||
|
|
||||||
|
QRadioButton *radioBtn = new QRadioButton();
|
||||||
|
QPen pen = QPen(it.value());
|
||||||
|
QBrush brush = QBrush(it.value());
|
||||||
|
radioBtn->setProperty("setDefaultPen", pen);
|
||||||
|
radioBtn->setProperty("setDefaultBrush", brush);
|
||||||
|
radioBtn->setProperty("setOnDefaultPen", pen);
|
||||||
|
radioBtn->setProperty("setOnDefaultBrush", brush);
|
||||||
|
radioBtn->setProperty("setHoverPen", pen);
|
||||||
|
radioBtn->setProperty("setHoverBrush", brush);
|
||||||
|
radioBtn->setProperty("setClickPen", pen);
|
||||||
|
radioBtn->setProperty("setClickBrush", brush);
|
||||||
|
radioBtn->setProperty("setOnHoverPen", pen);
|
||||||
|
radioBtn->setProperty("setOnHoverBrush", brush);
|
||||||
|
radioBtn->setProperty("setOnClickPen", pen);
|
||||||
|
radioBtn->setProperty("setOnClickBrush", brush);
|
||||||
|
radioBtn->setProperty("key", it.key());
|
||||||
|
|
||||||
|
if (!colorName.compare(radioBtn->property("key").toString())) {
|
||||||
|
radioBtn->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
mControlHLyt->addWidget(radioBtn);
|
||||||
|
|
||||||
|
connect(radioBtn, &QRadioButton::clicked, this, [=]{
|
||||||
|
qtSettings->set(COLOR_QT_KEY, radioBtn->property("key"));
|
||||||
|
});
|
||||||
|
it++;
|
||||||
|
}
|
||||||
|
|
||||||
|
mControlHLyt->addStretch();
|
||||||
|
mControlFrame->setLayout(mControlHLyt);
|
||||||
|
ui->controlLyt->addWidget(mControlFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Theme::initCursorTheme(){
|
void Theme::initCursorTheme(){
|
||||||
|
@ -526,6 +545,7 @@ void Theme::initCursorTheme(){
|
||||||
// 设置光标主题
|
// 设置光标主题
|
||||||
curSettings->set(CURSOR_THEME_KEY, value);
|
curSettings->set(CURSOR_THEME_KEY, value);
|
||||||
kwinCursorSlot(value);
|
kwinCursorSlot(value);
|
||||||
|
revokeGlobalThemeSlot();
|
||||||
});
|
});
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
@ -543,17 +563,19 @@ void Theme::initCursorTheme(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Theme::initSwitchTheme()
|
void Theme::initGlobalTheme()
|
||||||
{
|
{
|
||||||
QGSettings globalSet(QByteArray("org.ukui.globaltheme.settings"), QByteArray());
|
if (!mGlobalSettings->keys().contains("globalThemeName")) {
|
||||||
QString globalName = globalSet.get("global-theme-name").toString();
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString globalName = mGlobalSettings->get("global-theme-name").toString();
|
||||||
|
|
||||||
mHLyt = new QHBoxLayout();
|
mHLyt = new QHBoxLayout();
|
||||||
mSwitchFrame = new QFrame(pluginWidget);
|
mSwitchFrame = new QFrame(pluginWidget);
|
||||||
mSwitchFrame->setMinimumHeight(156);
|
mSwitchFrame->setMinimumHeight(156);
|
||||||
mSwitchFrame->setFrameShape(QFrame::Shape::Box);
|
mSwitchFrame->setFrameShape(QFrame::Shape::Box);
|
||||||
mSwitchFrame->setLayout(mHLyt);
|
mSwitchFrame->setLayout(mHLyt);
|
||||||
mBtnGroup = new QButtonGroup(this);
|
|
||||||
mSwitchLabel = new TitleLabel();
|
mSwitchLabel = new TitleLabel();
|
||||||
mSwitchLabel->setText(tr("Theme"));
|
mSwitchLabel->setText(tr("Theme"));
|
||||||
|
|
||||||
|
@ -564,12 +586,17 @@ void Theme::initSwitchTheme()
|
||||||
mGlobalthemehelper->loadThumbnail(theme);
|
mGlobalthemehelper->loadThumbnail(theme);
|
||||||
|
|
||||||
QString themeName = theme->getThemeName();
|
QString themeName = theme->getThemeName();
|
||||||
|
QString i18nName = theme->getLocaleThemeName();
|
||||||
|
|
||||||
QVBoxLayout *vLyt = new QVBoxLayout();
|
QVBoxLayout *vLyt = new QVBoxLayout();
|
||||||
QLabel *labelName = new QLabel(dullTranslation(themeName));
|
QLabel *labelName = new QLabel(i18nName);
|
||||||
|
|
||||||
PictureUnit *iconLabel = new PictureUnit(pluginWidget);
|
PictureUnit *iconLabel = new PictureUnit(pluginWidget);
|
||||||
|
|
||||||
|
if (!themeName.compare("custom")) {
|
||||||
|
mCustomPicUnit = iconLabel;
|
||||||
|
}
|
||||||
|
|
||||||
vLyt->addWidget(iconLabel);
|
vLyt->addWidget(iconLabel);
|
||||||
vLyt->addWidget(labelName);
|
vLyt->addWidget(labelName);
|
||||||
labelName->setAlignment(Qt::AlignCenter);
|
labelName->setAlignment(Qt::AlignCenter);
|
||||||
|
@ -579,7 +606,6 @@ void Theme::initSwitchTheme()
|
||||||
if (!globalName.compare(themeName)) {
|
if (!globalName.compare(themeName)) {
|
||||||
mPrePicUnit = iconLabel;
|
mPrePicUnit = iconLabel;
|
||||||
iconLabel->changeClickedFlag(true);
|
iconLabel->changeClickedFlag(true);
|
||||||
iconLabel->setStyleSheet(iconLabel->clickedStyleSheet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(theme, &GlobalTheme::thumbnailLoaded, this, [=]{
|
connect(theme, &GlobalTheme::thumbnailLoaded, this, [=]{
|
||||||
|
@ -590,13 +616,11 @@ void Theme::initSwitchTheme()
|
||||||
|
|
||||||
if (mPrePicUnit != nullptr) {
|
if (mPrePicUnit != nullptr) {
|
||||||
mPrePicUnit->changeClickedFlag(false);
|
mPrePicUnit->changeClickedFlag(false);
|
||||||
mPrePicUnit->setStyleSheet("border-width: 0px;");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
iconLabel->changeClickedFlag(true);
|
iconLabel->changeClickedFlag(true);
|
||||||
mPrePicUnit = iconLabel;
|
mPrePicUnit = iconLabel;
|
||||||
iconLabel->setFrameShape(QFrame::Box);
|
iconLabel->setFrameShape(QFrame::Box);
|
||||||
iconLabel->setStyleSheet(iconLabel->clickedStyleSheet);
|
|
||||||
changeGlobalThemeSlot(theme);
|
changeGlobalThemeSlot(theme);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -609,23 +633,7 @@ void Theme::initConnection() {
|
||||||
connect(ui->resetBtn, &QPushButton::clicked, this, &Theme::resetBtnClickSlot);
|
connect(ui->resetBtn, &QPushButton::clicked, this, &Theme::resetBtnClickSlot);
|
||||||
|
|
||||||
connect(effectSwitchBtn, &KSwitchButton::stateChanged, [this](bool checked) {
|
connect(effectSwitchBtn, &KSwitchButton::stateChanged, [this](bool checked) {
|
||||||
if (!checked) {
|
changeEffectSlot(checked);
|
||||||
save_trans = static_cast<int>(personliseGsettings->get(PERSONALSIE_TRAN_KEY).toDouble() * 100.0);
|
|
||||||
personliseGsettings->set(PERSONALSIE_SAVE_TRAN_KEY, save_trans);
|
|
||||||
personliseGsettings->set(PERSONALSIE_TRAN_KEY, 1.0);
|
|
||||||
qtSettings->set(THEME_TRAN_KEY, 100);
|
|
||||||
qtSettings->set(PEONY_TRAN_KEY, 100);
|
|
||||||
ui->tranSlider->setValue(100);
|
|
||||||
} else {
|
|
||||||
save_trans = personliseGsettings->get(PERSONALSIE_SAVE_TRAN_KEY).toInt();
|
|
||||||
ui->tranSlider->setValue(save_trans);
|
|
||||||
}
|
|
||||||
// 提供给外部监听特效接口
|
|
||||||
personliseGsettings->set(PERSONALSIE_EFFECT_KEY, checked);
|
|
||||||
QString currentThemeMode = qtSettings->get(MODE_QT_KEY).toString();
|
|
||||||
ui->transFrame->setVisible(checked && !Utils::isTablet());
|
|
||||||
ui->line->setVisible(checked && !Utils::isTablet());
|
|
||||||
writeKwinSettings(checked, currentThemeMode, true);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -776,10 +784,15 @@ void Theme::setupGSettings() {
|
||||||
const QByteArray idd(THEME_QT_SCHEMA);
|
const QByteArray idd(THEME_QT_SCHEMA);
|
||||||
const QByteArray iid(CURSOR_THEME_SCHEMA);
|
const QByteArray iid(CURSOR_THEME_SCHEMA);
|
||||||
const QByteArray iiid(PERSONALSIE_SCHEMA);
|
const QByteArray iiid(PERSONALSIE_SCHEMA);
|
||||||
|
const QByteArray globalID(GLOBAL_SCHEMA);
|
||||||
gtkSettings = new QGSettings(id, QByteArray(), this);
|
gtkSettings = new QGSettings(id, QByteArray(), this);
|
||||||
qtSettings = new QGSettings(idd, QByteArray(), this);
|
qtSettings = new QGSettings(idd, QByteArray(), this);
|
||||||
curSettings = new QGSettings(iid, QByteArray(), this);
|
curSettings = new QGSettings(iid, QByteArray(), this);
|
||||||
personliseGsettings = new QGSettings(iiid, QByteArray(), this);
|
personliseGsettings = new QGSettings(iiid, QByteArray(), this);
|
||||||
|
|
||||||
|
if (QGSettings::isSchemaInstalled(globalID)) {
|
||||||
|
mGlobalSettings = new QGSettings(globalID, QByteArray(), this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Theme::kwinCursorSlot(QString value) {
|
void Theme::kwinCursorSlot(QString value) {
|
||||||
|
@ -953,40 +966,96 @@ void Theme::themeBtnClickSlot(QAbstractButton *button) {
|
||||||
tmpMode = "ukui-white";
|
tmpMode = "ukui-white";
|
||||||
}
|
}
|
||||||
gtkSettings->set(MODE_GTK_KEY, tmpMode);
|
gtkSettings->set(MODE_GTK_KEY, tmpMode);
|
||||||
|
|
||||||
qtSettings->set(MODE_QT_KEY, themeMode);
|
qtSettings->set(MODE_QT_KEY, themeMode);
|
||||||
}
|
}
|
||||||
|
revokeGlobalThemeSlot();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Theme::changeGlobalThemeSlot(GlobalTheme *theme)
|
void Theme::changeGlobalThemeSlot(GlobalTheme *theme)
|
||||||
{
|
{
|
||||||
|
bool supportBlur = theme->getSupportBlur();
|
||||||
|
bool blurEnable = theme->getBlurEnabled();
|
||||||
|
|
||||||
|
bool supportTranspancy = theme->getSupportTransparency();
|
||||||
|
int transparency = theme->getTransparencyBlur();
|
||||||
|
|
||||||
QString globalName = theme->getThemeName();
|
QString globalName = theme->getThemeName();
|
||||||
QString wallpaper = theme->getWallPaperPath();
|
QString wallpaper = theme->getWallPaperPath();
|
||||||
QString iconName = theme->getIconThemeName();
|
QString iconName = theme->getIconThemeName();
|
||||||
QString cursorName = theme->getCursorThemeName();
|
QString cursorName = theme->getCursorThemeName();
|
||||||
QString widgetName = theme->getWidgetStyleName();
|
QString widgetName = theme->getWidgetStyleName();
|
||||||
QString colorTheme = theme->getDefaultLightDarkMode();
|
QString colorTheme = theme->getDefaultLightDarkMode();
|
||||||
|
QString gtkColorTheme;
|
||||||
|
|
||||||
if (!colorTheme.compare("light")) {
|
if (!colorTheme.compare("light")) {
|
||||||
colorTheme = theme->getQtLightThemeName();
|
colorTheme = theme->getQtLightThemeName();
|
||||||
|
gtkColorTheme = theme->getGtkLightThemeName();
|
||||||
} else if (!colorTheme.compare("dark")) {
|
} else if (!colorTheme.compare("dark")) {
|
||||||
colorTheme = theme->getQtDarkThemeName();
|
colorTheme = theme->getQtDarkThemeName();
|
||||||
|
gtkColorTheme = theme->getGtkDarkThemeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
QGSettings globalSet(QByteArray("org.ukui.globaltheme.settings"), QByteArray());
|
|
||||||
globalSet.set("global-theme-name", globalName);
|
|
||||||
|
|
||||||
QGSettings wallPaperSet(QByteArray("org.mate.background"), QByteArray());
|
QGSettings wallPaperSet(QByteArray("org.mate.background"), QByteArray());
|
||||||
wallPaperSet.set("picture-filename", wallpaper);
|
wallPaperSet.set("picture-filename", wallpaper);
|
||||||
|
|
||||||
|
mGlobalSettings->set(GLOBAL_NAME_KEY, globalName);
|
||||||
|
mGlobalSettings->set(ISMODIFY_KEY, false);
|
||||||
|
|
||||||
qtSettings->set(ICON_QT_KEY, iconName);
|
qtSettings->set(ICON_QT_KEY, iconName);
|
||||||
qtSettings->set(WIDGET_QT_KEY, widgetName);
|
qtSettings->set(WIDGET_QT_KEY, widgetName);
|
||||||
qtSettings->set(MODE_QT_KEY, colorTheme);
|
qtSettings->set(MODE_QT_KEY, colorTheme);
|
||||||
|
|
||||||
gtkSettings->set(ICON_GTK_KEY, iconName);
|
gtkSettings->set(ICON_GTK_KEY, iconName);
|
||||||
gtkSettings->set(MODE_GTK_KEY, iconName);
|
gtkSettings->set(MODE_GTK_KEY, gtkColorTheme);
|
||||||
|
|
||||||
curSettings->set(CURSOR_THEME_KEY, cursorName);
|
curSettings->set(CURSOR_THEME_KEY, cursorName);
|
||||||
|
|
||||||
|
if (supportBlur) {
|
||||||
|
changeEffectSlot(blurEnable);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportTranspancy) {
|
||||||
|
changeTranpancySlot(transparency);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Theme::revokeGlobalThemeSlot()
|
||||||
|
{
|
||||||
|
mPrePicUnit->changeClickedFlag(false);
|
||||||
|
mCustomPicUnit->changeClickedFlag(true);
|
||||||
|
|
||||||
|
if (mGlobalSettings) {
|
||||||
|
mGlobalSettings->set(ISMODIFY_KEY, true);
|
||||||
|
mGlobalSettings->set(GLOBAL_NAME_KEY, "custom");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Theme::changeEffectSlot(bool checked)
|
||||||
|
{
|
||||||
|
if (!checked) {
|
||||||
|
save_trans = static_cast<int>(personliseGsettings->get(PERSONALSIE_TRAN_KEY).toDouble() * 100.0);
|
||||||
|
personliseGsettings->set(PERSONALSIE_SAVE_TRAN_KEY, save_trans);
|
||||||
|
personliseGsettings->set(PERSONALSIE_TRAN_KEY, 1.0);
|
||||||
|
qtSettings->set(THEME_TRAN_KEY, 100);
|
||||||
|
qtSettings->set(PEONY_TRAN_KEY, 100);
|
||||||
|
ui->tranSlider->setValue(100);
|
||||||
|
} else {
|
||||||
|
save_trans = personliseGsettings->get(PERSONALSIE_SAVE_TRAN_KEY).toInt();
|
||||||
|
ui->tranSlider->setValue(save_trans);
|
||||||
|
}
|
||||||
|
// 提供给外部监听特效接口
|
||||||
|
personliseGsettings->set(PERSONALSIE_EFFECT_KEY, checked);
|
||||||
|
QString currentThemeMode = qtSettings->get(MODE_QT_KEY).toString();
|
||||||
|
ui->transFrame->setVisible(checked && !Utils::isTablet());
|
||||||
|
ui->line->setVisible(checked && !Utils::isTablet());
|
||||||
|
writeKwinSettings(checked, currentThemeMode, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Theme::changeTranpancySlot(int value)
|
||||||
|
{
|
||||||
|
personliseGsettings->set(PERSONALSIE_TRAN_KEY,(static_cast<int>(value) / 100.0));
|
||||||
|
qtSettings->set(THEME_TRAN_KEY, value);
|
||||||
|
qtSettings->set(PEONY_TRAN_KEY, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Theme::setCheckStatus(QLayout *mlayout, QString checkName, ThemeType type) {
|
void Theme::setCheckStatus(QLayout *mlayout, QString checkName, ThemeType type) {
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDir>
|
#include <QColor>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QtDBus/QDBusMessage>
|
#include <QtDBus/QDBusMessage>
|
||||||
#include <QGSettings>
|
#include <QGSettings>
|
||||||
|
@ -68,13 +68,12 @@ private:
|
||||||
int pluginType;
|
int pluginType;
|
||||||
QWidget *pluginWidget;
|
QWidget *pluginWidget;
|
||||||
|
|
||||||
QGSettings *gtkSettings;
|
QGSettings *gtkSettings = nullptr;
|
||||||
QGSettings *qtSettings;
|
QGSettings *qtSettings = nullptr;
|
||||||
QGSettings *curSettings;
|
QGSettings *curSettings = nullptr;
|
||||||
QSettings *kwinSettings;
|
|
||||||
QSettings *themeSettings;
|
|
||||||
QGSettings *kwinGsettings = nullptr;
|
|
||||||
QGSettings *personliseGsettings = nullptr;
|
QGSettings *personliseGsettings = nullptr;
|
||||||
|
QGSettings *mGlobalSettings = nullptr;
|
||||||
|
QSettings *kwinSettings;
|
||||||
|
|
||||||
KSwitchButton *effectSwitchBtn;
|
KSwitchButton *effectSwitchBtn;
|
||||||
|
|
||||||
|
@ -84,12 +83,18 @@ private:
|
||||||
WidgetGroup *iconThemeWidgetGroup;
|
WidgetGroup *iconThemeWidgetGroup;
|
||||||
|
|
||||||
TitleLabel *mSwitchLabel;
|
TitleLabel *mSwitchLabel;
|
||||||
|
TitleLabel *mControlLabel;
|
||||||
PictureUnit *mPrePicUnit = nullptr;
|
PictureUnit *mPrePicUnit = nullptr;
|
||||||
|
PictureUnit *mCustomPicUnit = nullptr;
|
||||||
GlobalThemeHelper *mGlobalthemehelper;
|
GlobalThemeHelper *mGlobalthemehelper;
|
||||||
|
|
||||||
QHBoxLayout *mHLyt;
|
QHBoxLayout *mHLyt;
|
||||||
QButtonGroup *mBtnGroup;
|
QHBoxLayout *mControlHLyt;
|
||||||
|
|
||||||
QFrame *mSwitchFrame;
|
QFrame *mSwitchFrame;
|
||||||
|
QFrame *mControlFrame;
|
||||||
|
|
||||||
|
QMap<QString, QColor> mControlMap;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Theme();
|
Theme();
|
||||||
|
@ -108,9 +113,9 @@ public:
|
||||||
void setupComponent();
|
void setupComponent();
|
||||||
void initThemeMode();
|
void initThemeMode();
|
||||||
void initIconTheme();
|
void initIconTheme();
|
||||||
void setupControlTheme();
|
void initControlTheme();
|
||||||
void initCursorTheme();
|
void initCursorTheme();
|
||||||
void initSwitchTheme();
|
void initGlobalTheme();
|
||||||
void initConnection();
|
void initConnection();
|
||||||
void initIconThemeWidget(QString themedir, int count);
|
void initIconThemeWidget(QString themedir, int count);
|
||||||
void initCursorThemeWidget(QString themedir, int count);
|
void initCursorThemeWidget(QString themedir, int count);
|
||||||
|
@ -134,7 +139,7 @@ private:
|
||||||
QString dullCursorTranslation(QString str);
|
QString dullCursorTranslation(QString str);
|
||||||
QString getCursorName();
|
QString getCursorName();
|
||||||
|
|
||||||
void hideIntelComponent(); // 隐藏非intel功能
|
void hideIntelComponent();
|
||||||
|
|
||||||
bool isBlurEffect();
|
bool isBlurEffect();
|
||||||
|
|
||||||
|
@ -143,6 +148,9 @@ private slots:
|
||||||
void writeKwinSettings(bool change, QString theme, bool effect = false);
|
void writeKwinSettings(bool change, QString theme, bool effect = false);
|
||||||
void themeBtnClickSlot(QAbstractButton *button);
|
void themeBtnClickSlot(QAbstractButton *button);
|
||||||
void changeGlobalThemeSlot(GlobalTheme *theme);
|
void changeGlobalThemeSlot(GlobalTheme *theme);
|
||||||
|
void revokeGlobalThemeSlot();
|
||||||
|
void changeEffectSlot(bool checked);
|
||||||
|
void changeTranpancySlot(int value);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // THEME_H
|
#endif // THEME_H
|
||||||
|
|
|
@ -29,6 +29,7 @@ PKGCONFIG += gsettings-qt \
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
cursor/cursortheme.cpp \
|
cursor/cursortheme.cpp \
|
||||||
cursor/xcursortheme.cpp \
|
cursor/xcursortheme.cpp \
|
||||||
|
globaltheme/customglobaltheme.cpp \
|
||||||
globaltheme/globaltheme.cpp \
|
globaltheme/globaltheme.cpp \
|
||||||
pictureunit.cpp \
|
pictureunit.cpp \
|
||||||
globaltheme/globalthemehelper.cpp \
|
globaltheme/globalthemehelper.cpp \
|
||||||
|
@ -43,6 +44,7 @@ HEADERS += \
|
||||||
cursor/config-X11.h \
|
cursor/config-X11.h \
|
||||||
cursor/cursortheme.h \
|
cursor/cursortheme.h \
|
||||||
cursor/xcursortheme.h \
|
cursor/xcursortheme.h \
|
||||||
|
globaltheme/customglobaltheme.h \
|
||||||
globaltheme/globaltheme.h \
|
globaltheme/globaltheme.h \
|
||||||
globaltheme/globaltheme_p.h \
|
globaltheme/globaltheme_p.h \
|
||||||
globaltheme/globalthemehelper.h \
|
globaltheme/globalthemehelper.h \
|
||||||
|
|
|
@ -70,6 +70,19 @@
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="switchLyt"/>
|
<layout class="QVBoxLayout" name="switchLyt"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="TitleLabel" name="titleLabel">
|
<widget class="TitleLabel" name="titleLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -339,6 +352,22 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_7">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>4</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="controlLyt"/>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -415,81 +444,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="TitleLabel" name="controlLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Control theme</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="controlWidget" native="true">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>66</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>66</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="controlHorLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>16</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>24</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>24</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_3">
|
<spacer name="verticalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
|
@ -3130,6 +3130,14 @@ change system settings</source>
|
||||||
<translation>含有非法字符!</translation>
|
<translation>含有非法字符!</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>CustomGlobalTheme</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../../plugins/personalized/theme/globaltheme/customglobaltheme.cpp" line="32"/>
|
||||||
|
<source>custom</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>CustomLineEdit</name>
|
<name>CustomLineEdit</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -10734,64 +10742,64 @@ E-mail: support@kylinos.cn</source>
|
||||||
<translation type="vanished">主题模式</translation>
|
<translation type="vanished">主题模式</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="109"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="110"/>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="533"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="579"/>
|
||||||
<source>Theme</source>
|
<source>Theme</source>
|
||||||
<translation>主题</translation>
|
<translation>主题</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="243"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="239"/>
|
||||||
<source>Default</source>
|
<source>Default</source>
|
||||||
<translation>默认</translation>
|
<translation>默认</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="244"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="240"/>
|
||||||
<source>Light</source>
|
<source>Light</source>
|
||||||
<translation>浅色</translation>
|
<translation>浅色</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="245"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="241"/>
|
||||||
<source>Dark</source>
|
<source>Dark</source>
|
||||||
<translation>深色</translation>
|
<translation>深色</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="483"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="485"/>
|
||||||
<source>Corlor</source>
|
<source>Corlor</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>强调色</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="787"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="819"/>
|
||||||
<source>Blue-Crystal</source>
|
<source>Blue-Crystal</source>
|
||||||
<translation>蓝水晶</translation>
|
<translation>蓝水晶</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="789"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="821"/>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="832"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="864"/>
|
||||||
<source>Light-Seeking</source>
|
<source>Light-Seeking</source>
|
||||||
<translation>寻光</translation>
|
<translation>寻光</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="791"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="823"/>
|
||||||
<source>DMZ-Black</source>
|
<source>DMZ-Black</source>
|
||||||
<translation>DMZ-黑</translation>
|
<translation>DMZ-黑</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="793"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="825"/>
|
||||||
<source>DMZ-White</source>
|
<source>DMZ-White</source>
|
||||||
<translation>DMZ-白</translation>
|
<translation>DMZ-白</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="795"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="827"/>
|
||||||
<source>Dark-Sense</source>
|
<source>Dark-Sense</source>
|
||||||
<translation>黑色质感</translation>
|
<translation>黑色质感</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="828"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="860"/>
|
||||||
<source>basic</source>
|
<source>basic</source>
|
||||||
<translation>基础</translation>
|
<translation>基础</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="830"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="862"/>
|
||||||
<source>Classic</source>
|
<source>Classic</source>
|
||||||
<translation>启典</translation>
|
<translation>启典</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -10804,22 +10812,22 @@ E-mail: support@kylinos.cn</source>
|
||||||
<translation type="vanished">时尚</translation>
|
<translation type="vanished">时尚</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="836"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="868"/>
|
||||||
<source>hp</source>
|
<source>hp</source>
|
||||||
<translation>惠普</translation>
|
<translation>惠普</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="838"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="870"/>
|
||||||
<source>ukui</source>
|
<source>ukui</source>
|
||||||
<translation>寻光</translation>
|
<translation>寻光</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="834"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="866"/>
|
||||||
<source>HeYin</source>
|
<source>HeYin</source>
|
||||||
<translation>和印</translation>
|
<translation>和印</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="840"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="872"/>
|
||||||
<source>default</source>
|
<source>default</source>
|
||||||
<translation>默认</translation>
|
<translation>默认</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -10828,15 +10836,15 @@ E-mail: support@kylinos.cn</source>
|
||||||
<translation type="vanished">中</translation>
|
<translation type="vanished">中</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.ui" line="82"/>
|
<location filename="../../../plugins/personalized/theme/theme.ui" line="95"/>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="166"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="167"/>
|
||||||
<source>Window Theme</source>
|
<source>Window Theme</source>
|
||||||
<translation>窗口主题</translation>
|
<translation>窗口主题</translation>
|
||||||
<extra-contents_path>/Theme/Window Theme</extra-contents_path>
|
<extra-contents_path>/Theme/Window Theme</extra-contents_path>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.ui" line="370"/>
|
<location filename="../../../plugins/personalized/theme/theme.ui" line="396"/>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="168"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="169"/>
|
||||||
<source>Icon theme</source>
|
<source>Icon theme</source>
|
||||||
<translation>图标</translation>
|
<translation>图标</translation>
|
||||||
<extra-contents_path>/Theme/Icon theme</extra-contents_path>
|
<extra-contents_path>/Theme/Icon theme</extra-contents_path>
|
||||||
|
@ -10846,20 +10854,20 @@ E-mail: support@kylinos.cn</source>
|
||||||
<translation type="vanished">控件主题</translation>
|
<translation type="vanished">控件主题</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.ui" line="446"/>
|
<location filename="../../../plugins/personalized/theme/theme.ui" line="472"/>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="170"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="171"/>
|
||||||
<source>Cursor theme</source>
|
<source>Cursor theme</source>
|
||||||
<translation>光标</translation>
|
<translation>光标</translation>
|
||||||
<extra-contents_path>/Theme/Cursor theme</extra-contents_path>
|
<extra-contents_path>/Theme/Cursor theme</extra-contents_path>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.ui" line="522"/>
|
<location filename="../../../plugins/personalized/theme/theme.ui" line="548"/>
|
||||||
<source>Effect setting</source>
|
<source>Effect setting</source>
|
||||||
<translation>窗口特效</translation>
|
<translation>窗口特效</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.ui" line="724"/>
|
<location filename="../../../plugins/personalized/theme/theme.ui" line="750"/>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="174"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="175"/>
|
||||||
<source>Transparency</source>
|
<source>Transparency</source>
|
||||||
<translation>透明度</translation>
|
<translation>透明度</translation>
|
||||||
<extra-contents_path>/Theme/Transparency</extra-contents_path>
|
<extra-contents_path>/Theme/Transparency</extra-contents_path>
|
||||||
|
@ -10869,8 +10877,8 @@ E-mail: support@kylinos.cn</source>
|
||||||
<translation type="vanished">透明特效</translation>
|
<translation type="vanished">透明特效</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.ui" line="621"/>
|
<location filename="../../../plugins/personalized/theme/theme.ui" line="647"/>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.cpp" line="172"/>
|
<location filename="../../../plugins/personalized/theme/theme.cpp" line="173"/>
|
||||||
<source>Performance mode</source>
|
<source>Performance mode</source>
|
||||||
<translation>特效模式</translation>
|
<translation>特效模式</translation>
|
||||||
<extra-contents_path>/Theme/Performance mode</extra-contents_path>
|
<extra-contents_path>/Theme/Performance mode</extra-contents_path>
|
||||||
|
@ -10888,7 +10896,7 @@ E-mail: support@kylinos.cn</source>
|
||||||
<translation type="vanished">高</translation>
|
<translation type="vanished">高</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../../plugins/personalized/theme/theme.ui" line="842"/>
|
<location filename="../../../plugins/personalized/theme/theme.ui" line="868"/>
|
||||||
<source>Reset to default</source>
|
<source>Reset to default</source>
|
||||||
<translation>恢复默认</translation>
|
<translation>恢复默认</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Loading…
Reference in New Issue