Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions deepin-devicemanager/assets/org.deepin.devicemanager.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@
"description": "此配置项默认为空。如果specialComType==8,程序则启用此项配置。",
"permissions": "readwrite",
"visibility": "private"
},
"showScreenSize": {
"value": true,
"serial": 0,
"flags": [
"global"
],
"name": "Is show screen size",
"name[zh_CN]": "是否显示屏幕尺寸",
"description": "是否显示屏幕尺寸,默认为true",
"permissions": "readwrite",
"visibility": "private"
}
}
}
12 changes: 10 additions & 2 deletions deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -403,7 +403,15 @@
}
}
addOtherDeviceInfo("Primary Monitor", m_MainScreen);
addOtherDeviceInfo("Size", m_ScreenSize);
bool showScreenSize { true };

Check warning on line 406 in deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Condition 'showScreenSize' is always true

Check warning on line 406 in deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Condition 'showScreenSize' is always true
#ifdef DTKCORE_CLASS_DConfigFile
DConfig *dconfig = DConfig::create("org.deepin.devicemanager","org.deepin.devicemanager");
if(dconfig && dconfig->isValid() && dconfig->keyList().contains("showScreenSize")){
showScreenSize = dconfig->value("showScreenSize").toBool();
}
#endif
if (showScreenSize)
addOtherDeviceInfo("Size", m_ScreenSize);
addOtherDeviceInfo("Serial Number", m_SerialNumber);
// addOtherDeviceInfo("Product Date", m_ProductionWeek);

Expand Down
Loading