代码拉取完成,页面将自动刷新
From b1400c71a92d0893103d3a1a616976fac0787117 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Thu, 9 Mar 2023 14:10:33 +0800
Subject: [PATCH] fix mate-terminal theme
---
decorations/decorationbridge.cpp | 19 +++++++++++++++++++
1 files changed, 19 insertions(+)
diff --git a/decorations/decorationbridge.cpp b/decorations/decorationbridge.cpp
index 10e766c..a19fe8a 100644
--- a/decorations/decorationbridge.cpp
+++ b/decorations/decorationbridge.cpp
@@ -156,7 +156,26 @@ void DecorationBridge::init()
m_dpi = 30; //设置一个限度,不允许dpi小于30
}
}
+ QGSettings* pThemeSettings = new QGSettings("org.ukui.style", "/org/ukui/style/", this);
+ QString strTheme;
+ if (true == pThemeSettings->keys().contains("styleName")){
+ strTheme = pThemeSettings->get("style-name").toString();
+ qDebug() << "DecorationBridge::init theme:" << strTheme;
+ }
+
+ if("ukui-light" == strTheme)
+ {
+ m_themeId = 0;
+ }
+ else if("ukui-dark" == strTheme)
+ {
+ m_themeId = 1;
+ }
+ else //默认ukui-default
+ {
+ m_themeId = 0;
+ }
const QFont font = QFontDatabase::systemFont(QFontDatabase::TitleFont);
m_nFont = font.pointSize();
--
2.39.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。