fix: theme

Description: 202752 ubuntu系统安装ukui桌面环境,控制面板里点击主题崩溃

Log: 202752 ubuntu系统安装ukui桌面环境,控制面板里点击主题崩溃
Bug: 202752 ubuntu系统安装ukui桌面环境,控制面板里点击主题崩溃
This commit is contained in:
zhoubin 2024-04-05 17:13:23 +08:00
parent feb8913167
commit cf0a006cbe
8 changed files with 20 additions and 27 deletions

9
debian/changelog vendored
View File

@ -1,3 +1,12 @@
ukui-control-center (3.22.1.25-ok60) yangtze; urgency=medium
* BUG: #202752 ubuntu系统安装ukui桌面环境控制面板里点击主题崩溃
* 需求号: 无
* 其他改动说明:解决编译问题
* 其他改动影响域:无,重新编译
-- zhoubin <zhoubin@kylinos.cn> Fri, 05 Apr 2024 17:11:19 +0800
ukui-control-center (3.22.1.25-ok59) yangtze; urgency=medium ukui-control-center (3.22.1.25-ok59) yangtze; urgency=medium
* BUG: #I7WDUY修改时区为北京或者乌鲁木齐都会变为上海 * BUG: #I7WDUY修改时区为北京或者乌鲁木齐都会变为上海

View File

@ -33,21 +33,6 @@ group_manager_server::group_manager_server()
} }
bool group_manager_server::setAuth(bool auth)
{
if (authoriy) {
//密码校验
if (!authoriyEdit()){
authoriy = auth;
return false;
}
}
authoriy = auth;
return true;
}
// 解析组文件 // 解析组文件
QVariantList group_manager_server::getGroup() QVariantList group_manager_server::getGroup()
{ {

View File

@ -45,7 +45,6 @@ private:
bool _changeOtherUserPasswd(QString username, QString pwd); bool _changeOtherUserPasswd(QString username, QString pwd);
public slots: public slots:
bool setAuth(bool auth);
QVariantList getGroup(); QVariantList getGroup();
QVariantList getPasswd(); QVariantList getPasswd();
bool add(QString groupName, QString groupId); bool add(QString groupName, QString groupId);

View File

@ -1,10 +1,6 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node> <node>
<interface name="org.ukui.groupmanager.interface"> <interface name="org.ukui.groupmanager.interface">
<method name="setAuth">
<arg type="b" direction="out"/>
<arg name="auth" type="b" direction="in"/>
</method>
<method name="getGroup"> <method name="getGroup">
<arg type="av" direction="out"/> <arg type="av" direction="out"/>
</method> </method>

View File

@ -192,7 +192,7 @@ bool UkccCommon::isWayland() {
bool UkccCommon::isOpenkylin() bool UkccCommon::isOpenkylin()
{ {
QString systemName = QString(QLatin1String(kdk_system_get_systemName())); QString systemName = QString(QLatin1String(kdk_system_get_systemName()));
QString version = QString(QLatin1String(kdk_system_get_version(1))); QString version = QString(QLatin1String(kdk_system_get_version(0)));
if (systemName.compare("openkylin", Qt::CaseInsensitive) == 0 if (systemName.compare("openkylin", Qt::CaseInsensitive) == 0
&& version.contains("yangtze", Qt::CaseInsensitive)) { && version.contains("yangtze", Qt::CaseInsensitive)) {
return true; return true;
@ -203,7 +203,7 @@ bool UkccCommon::isOpenkylin()
bool UkccCommon::isOpenkylinNile() bool UkccCommon::isOpenkylinNile()
{ {
QString systemName = QString(QLatin1String(kdk_system_get_systemName())); QString systemName = QString(QLatin1String(kdk_system_get_systemName()));
QString version = QString(QLatin1String(kdk_system_get_version(1))); QString version = QString(QLatin1String(kdk_system_get_version(0)));
if (systemName.compare("openkylin", Qt::CaseInsensitive) == 0 if (systemName.compare("openkylin", Qt::CaseInsensitive) == 0
&& version.contains("nile", Qt::CaseInsensitive)) { && version.contains("nile", Qt::CaseInsensitive)) {
return true; return true;

View File

@ -254,14 +254,13 @@ void Theme::initSearchText() {
} }
void Theme::setupSettings() { void Theme::setupSettings() {
QString filename;
if (UkccCommon::isOpenkylin()) { if (UkccCommon::isOpenkylin()) {
filename = QDir::homePath() + "/.config/kwinrc"; m_kwinFile = QDir::homePath() + "/.config/kwinrc";
} else { } else {
filename = QDir::homePath() + "/.config/ukui-kwinrc"; m_kwinFile = QDir::homePath() + "/.config/ukui-kwinrc";
} }
kwinSettings = new QSettings(filename, QSettings::IniFormat, this); kwinSettings = new QSettings(m_kwinFile, QSettings::IniFormat, this);
QStringList keys = kwinSettings->childGroups(); QStringList keys = kwinSettings->childGroups();
kwinSettings->beginGroup("Plugins"); kwinSettings->beginGroup("Plugins");
@ -1114,6 +1113,10 @@ void Theme::resetBtnClickSlot() {
} }
void Theme::writeKwinSettings(bool change) { void Theme::writeKwinSettings(bool change) {
if (!QFile::exists(m_kwinFile)) {
return;
}
if (!change) { if (!change) {
kwinSettings->beginGroup("Plugins"); kwinSettings->beginGroup("Plugins");
kwinSettings->setValue("kwin4_effect_maximizeEnabled", false); kwinSettings->setValue("kwin4_effect_maximizeEnabled", false);

View File

@ -189,6 +189,7 @@ public:
void setThemeBtnStatus(); void setThemeBtnStatus();
QString mGlobalName; QString mGlobalName;
QString m_kwinFile;
bool mIsUpgrade = false; bool mIsUpgrade = false;
bool mIsOpenkylin = false; bool mIsOpenkylin = false;

View File

@ -227,7 +227,7 @@ QMLOutput {
right: parent.right; right: parent.right;
} }
horizontalAlignment: Text.AlignHCenter; horizontalAlignment: Text.AlignHCenter;
color: "#FFFFFF"; color: root.focus ? "#FFFFFF" : "#262626";
font.pixelSize: 12; font.pixelSize: 12;
elide: Text.ElideRight; elide: Text.ElideRight;
} }