Signed-off-by: kylinsecos_admin <gitee@kylinos.com.cn> 修复编译错误 Signed-off-by: kylinsecos_admin <gitee@kylinos.com.cn>
63 lines
2.4 KiB
Diff
63 lines
2.4 KiB
Diff
From 2028295df5882c450820d8f7d1f9463d28a7e8f8 Mon Sep 17 00:00:00 2001
|
|
From: yuanxing <yuanxing@kylinos.com.cn>
|
|
Date: Thu, 25 Nov 2021 15:44:45 +0800
|
|
Subject: [PATCH] fix(theme):set metacity theme when user change theme
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
- 当用户切换主题时设置窗口主题
|
|
---
|
|
src/pages/theme/themes.cpp | 2 ++
|
|
translations/kiran-cpanel-appearance.zh_CN.ts | 7 +++----
|
|
2 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/pages/theme/themes.cpp b/src/pages/theme/themes.cpp
|
|
index d737cfe..9c6e8f1 100644
|
|
--- a/src/pages/theme/themes.cpp
|
|
+++ b/src/pages/theme/themes.cpp
|
|
@@ -316,6 +316,8 @@ void Themes::createThemeWidget()
|
|
return;
|
|
if (!AppearanceGlobalInfo::instance()->setTheme(APPEARANCE_THEME_TYPE_GTK, theme))
|
|
return;
|
|
+ if (!AppearanceGlobalInfo::instance()->setTheme(APPEARANCE_THEME_TYPE_METACITY, theme))
|
|
+ return;
|
|
KLOG_INFO() << "set themes successful:" << theme;
|
|
});
|
|
}
|
|
diff --git a/translations/kiran-cpanel-appearance.zh_CN.ts b/translations/kiran-cpanel-appearance.zh_CN.ts
|
|
index 1dd67ca..24a99f0 100644
|
|
--- a/translations/kiran-cpanel-appearance.zh_CN.ts
|
|
+++ b/translations/kiran-cpanel-appearance.zh_CN.ts
|
|
@@ -73,9 +73,8 @@
|
|
<translation>等宽字体设置</translation>
|
|
</message>
|
|
<message>
|
|
- <location filename="../src/pages/font/fonts.cpp" line="62"/>
|
|
<source>None</source>
|
|
- <translation>暂无</translation>
|
|
+ <translation type="vanished">暂无</translation>
|
|
</message>
|
|
</context>
|
|
<context>
|
|
@@ -173,14 +172,14 @@
|
|
<context>
|
|
<name>QObject</name>
|
|
<message>
|
|
- <location filename="../src/pages/font/fonts.cpp" line="154"/>
|
|
+ <location filename="../src/pages/font/fonts.cpp" line="143"/>
|
|
<location filename="../src/pages/theme/themes.cpp" line="140"/>
|
|
<location filename="../src/pages/theme/themes.cpp" line="185"/>
|
|
<source>Failed</source>
|
|
<translation>失败</translation>
|
|
</message>
|
|
<message>
|
|
- <location filename="../src/pages/font/fonts.cpp" line="155"/>
|
|
+ <location filename="../src/pages/font/fonts.cpp" line="144"/>
|
|
<source>Set font failed!</source>
|
|
<translation>设置字体失败!</translation>
|
|
</message>
|
|
--
|
|
2.27.0
|
|
|