commit
666adfe296
@ -0,0 +1,88 @@
|
||||
From 75bfd27cafae31634a8f93665c325530bdb7d3a6 Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinos.com.cn>
|
||||
Date: Mon, 6 Dec 2021 16:48:08 +0800
|
||||
Subject: [PATCH 0/1] fix(revealed overlapping): temporarily solve the problem
|
||||
of display overlap and screen gap(#46434)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 暂时解决屏幕分辨率调节时因未同步调整其他屏幕的位置导致的显示重叠与屏幕存在间隙的问题
|
||||
|
||||
Closes #46434
|
||||
---
|
||||
src/kiran-display-configuration.cpp | 49 ++++++++++++++++-------------
|
||||
1 file changed, 28 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/src/kiran-display-configuration.cpp b/src/kiran-display-configuration.cpp
|
||||
index bb88705..0b6016d 100644
|
||||
--- a/src/kiran-display-configuration.cpp
|
||||
+++ b/src/kiran-display-configuration.cpp
|
||||
@@ -94,29 +94,33 @@ void KiranDisplayConfiguration::on_pushButton_extra_ok_clicked()
|
||||
//添加/更新当前编辑界面的数据
|
||||
curExtraData2Cache();
|
||||
|
||||
- //往屏幕数据中添加剩余的其它数据。
|
||||
- QVariantMap map = ui->panel->getData();
|
||||
- QMapIterator<QString, QVariant> i(map);
|
||||
- while (i.hasNext()) {
|
||||
- i.next();
|
||||
- QVariantMap d = i.value().toMap();
|
||||
- if(m_extraData.contains(i.key()))//两个map的key值匹配上。
|
||||
- {
|
||||
- QVariantMap extraMap = m_extraData.value(i.key());
|
||||
- //添加
|
||||
- d.insert("primary", m_primaryMonitorName==d.value("name").toString());
|
||||
- d.insert("enabled", extraMap.value("enabled"));
|
||||
- d.insert("resolving", extraMap.value("resolving"));
|
||||
- d.insert("refreshRate", extraMap.value("refreshRate"));
|
||||
+ ///FIXME:此处保存两次只是为了暂时解决修改分辨率时由于未进行屏幕排列导致的内容重叠以及屏幕之中存在间隔
|
||||
+ ///后续重构应该更改为下方参数修改时上方预览应同步修改,以及动态调整屏幕位置
|
||||
+ for( int i=0;i<2;i++ )
|
||||
+ {
|
||||
+ //往屏幕数据中添加剩余的其它数据。
|
||||
+ QVariantMap map = ui->panel->getData();
|
||||
+ QMapIterator<QString, QVariant> iter(map);
|
||||
+ while (iter.hasNext()) {
|
||||
+ iter.next();
|
||||
+ QVariantMap d = iter.value().toMap();
|
||||
+ if(m_extraData.contains(iter.key()))//两个map的key值匹配上。
|
||||
+ {
|
||||
+ QVariantMap extraMap = m_extraData.value(iter.key());
|
||||
+ //添加
|
||||
+ d.insert("primary", m_primaryMonitorName==d.value("name").toString());
|
||||
+ d.insert("enabled", extraMap.value("enabled"));
|
||||
+ d.insert("resolving", extraMap.value("resolving"));
|
||||
+ d.insert("refreshRate", extraMap.value("refreshRate"));
|
||||
+ }
|
||||
+ setMonitorProperty(iter.key(), d);
|
||||
}
|
||||
-
|
||||
- setMonitorProperty(i.key(), d);
|
||||
+ //缩放率所有屏幕都是通用的。
|
||||
+ Display("SetWindowScalingFactor", QVariantList() << ui->comboBox_extra_windowScalingFactor->currentIndex());
|
||||
+ Display("ApplyChanges");
|
||||
+ //可能设置失败,界面根据设置实际情况再刷新。
|
||||
+ refreshWidget();
|
||||
}
|
||||
- //缩放率所有屏幕都是通用的。
|
||||
- Display("SetWindowScalingFactor", QVariantList() << ui->comboBox_extra_windowScalingFactor->currentIndex());
|
||||
- Display("ApplyChanges");
|
||||
- //可能设置失败,界面根据设置实际情况再刷新。
|
||||
- refreshWidget();
|
||||
|
||||
showMessageBox();
|
||||
m_dbusPropertiesChangedBlock = false;
|
||||
@@ -611,6 +615,9 @@ void KiranDisplayConfiguration::setMonitorProperty(const QString &monitorPath, c
|
||||
if(map.contains("enabled")) Monitor<QVariant>(monitorPath, "Enable", QVariantList() << map.value("enabled").toBool());
|
||||
|
||||
if(map.contains("x") && map.contains("y")) Monitor<QVariant>(monitorPath, "SetPosition", QVariantList() << (int32_t)map.value("x").toInt() << (int32_t)map.value("y").toInt());
|
||||
+ if(map.contains("x") && map.contains("y")){
|
||||
+ qInfo() << "set position:" << (int32_t)map.value("x").toInt() << (int32_t)map.value("y").toInt();
|
||||
+ }
|
||||
if(map.contains("rotation")){
|
||||
QVariant var;
|
||||
var.setValue(QDBusArgument() << (ushort)map.value("rotation").toUInt());
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
From c857dfc8e00d45c919d490fb389f484e23b5d139 Mon Sep 17 00:00:00 2001
|
||||
From: liuxinhao <liuxinhao@kylinos.com.cn>
|
||||
Date: Thu, 30 Dec 2021 10:30:27 +0800
|
||||
Subject: [PATCH 1/1] fix(control center): fix kiran session display management
|
||||
is not displayed in the control panel
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 修复显示设置工具由于desktop之中OnlyShowIn=MATE,导致的不能显示在KIRAN桌面的mate-control-center之中
|
||||
---
|
||||
data/kiran-cpanel-display.desktop.in | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/data/kiran-cpanel-display.desktop.in b/data/kiran-cpanel-display.desktop.in
|
||||
index 6ac7ff4..55595c8 100644
|
||||
--- a/data/kiran-cpanel-display.desktop.in
|
||||
+++ b/data/kiran-cpanel-display.desktop.in
|
||||
@@ -9,8 +9,7 @@ Icon=kcp-display
|
||||
#通过启动器单独执行 <kiran-cpanel-launcher -cpanel-plugin 插件的desktop文件名>
|
||||
Exec=kiran-cpanel-launcher --cpanel-plugin=kiran-cpanel-display
|
||||
Categories=Qt;Settings;HardwareSettings;X-Hardware;X-Common-Features;
|
||||
-Keywords=mate-control-center;MATE;display
|
||||
-OnlyShowIn=MATE;
|
||||
+Keywords=display
|
||||
X-KIRAN-NoDisplay=true
|
||||
StartupNotify=true
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Binary file not shown.
@ -1,11 +1,14 @@
|
||||
Name: kiran-cpanel-display
|
||||
Version: 2.1.0
|
||||
Release: 2%{?dist}
|
||||
Version: 2.2.0
|
||||
Release: 3.kb3
|
||||
Summary: kiran display tools
|
||||
|
||||
License: Mulan PSL v2
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
Patch0001: 0000-fix-revealed-overlapping-temporarily-solve-the-probl-75bfd27c.patch
|
||||
Patch0002: 0001-fix-control-center-fix-kiran-session-display-managem-c857dfc8.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libX11-devel
|
||||
@ -34,6 +37,8 @@ Obsoletes: kiran-display-tools
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0001 -p1
|
||||
%patch0002 -p1
|
||||
|
||||
%build
|
||||
%{__mkdir} -p %{buildroot}
|
||||
@ -65,11 +70,33 @@ fi
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Mon Oct 18 2021 xiewenhao <xiewenhao@kylinos.com.cn> - 2.1.0-1.kb2
|
||||
- KYOS-B: fix license information (#43502)
|
||||
* Sat Jan 15 2022 longcheng <longcheng@kylinos.com.cn> - 2.2.0-3.kb3
|
||||
- KYOS-B: fix the patch was not inserted
|
||||
|
||||
* Thu Dec 30 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.2.0-3.kb2
|
||||
- KYOS-B: temporarily solve the problem of display overlap and screen gap(#46434)
|
||||
- KYOS-B: fix kiran session display management is not displayed in the control panel
|
||||
|
||||
* Wed Dec 29 2021 kpkg <kpkg@kylinos.com.cn> - 2.2.0-3.kb1
|
||||
- rebuild for KY3.4-MATE-modules-dev
|
||||
|
||||
* Wed Dec 29 2021 caoyuanji<caoyuanji@kylinos.com.cn> - 2.2.0-3
|
||||
- Upgrade version number for easy upgrade
|
||||
|
||||
* Tue Dec 28 2021 caoyuanji <caoyuanji@kylinos.com.cn> - 2.2.0-1.kb1
|
||||
- rebuild for KY3.4-4-KiranUI-2.2
|
||||
|
||||
* Thu Dec 02 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.2.0-1
|
||||
- KYBD: build for 2.2,changed required name to kiran-widgets-qt5
|
||||
|
||||
* Thu Dec 02 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-2.kb2
|
||||
- KYBD: changed required name to kiranwidgets-qt5
|
||||
|
||||
* Fri Nov 05 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 2.1.0-2.kb1
|
||||
- KYBD: changed required name and license
|
||||
|
||||
* Tue Jul 20 2021 luixinhao <liuxinhao@kylinos.com.cn> - 2.1.0-1.kb1
|
||||
- KYOS-F: install desktop link (#38890)
|
||||
- KYOS-F: install desktop link
|
||||
|
||||
* Wed Jun 30 2021 liuxinhao <liuxinhao@kylinos.com.cn> - 1.1.0-2.kb1
|
||||
- KYOS-B: don't exit if translation file not found
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user