44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
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
|
||
|