ukui-kwin/0002-fix-mate-terminal-theme.patch
2023-05-23 10:51:20 +08:00

44 lines
1.2 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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