Fix incomplete display of the system monitor when the resolution is 1020 * 768
This commit is contained in:
parent
ad4421ea38
commit
23637dbbf8
@ -0,0 +1,82 @@
|
||||
From 8f76d34ed203bc07d20ba0283c95903de5347888 Mon Sep 17 00:00:00 2001
|
||||
From: yangxianzhao <yangxianzhao@uniontech.com>
|
||||
Date: Thu, 6 Apr 2023 14:50:02 +0800
|
||||
Subject: [PATCH] Fix incomplete display of the system monitor when the
|
||||
resolution is 1020*768
|
||||
|
||||
---
|
||||
src/CMakeLists.txt | 1 +
|
||||
src/constant.h | 27 +++++++++++++++++++++++++++
|
||||
src/main.cpp | 3 ++-
|
||||
3 files changed, 30 insertions(+), 1 deletion(-)
|
||||
create mode 100644 src/constant.h
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 5df6473..b71fced 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -59,6 +59,7 @@ set(HPP_GLOBAL
|
||||
compact_disk_monitor.h
|
||||
smooth_curve_generator.h
|
||||
settings.h
|
||||
+ constant.h
|
||||
)
|
||||
|
||||
set(CPP_GLOBAL
|
||||
diff --git a/src/constant.h b/src/constant.h
|
||||
new file mode 100644
|
||||
index 0000000..9a2967d
|
||||
--- /dev/null
|
||||
+++ b/src/constant.h
|
||||
@@ -0,0 +1,27 @@
|
||||
+/*
|
||||
+* Copyright (C) 2011 ~ 2020 Uniontech Software Technology Co.,Ltd
|
||||
+*
|
||||
+* Author: Wang Yong <wangyong@deepin.com>
|
||||
+* Maintainer: maojj <maojunjie@uniontech.com>
|
||||
+*
|
||||
+* This program is free software: you can redistribute it and/or modify
|
||||
+* it under the terms of the GNU General Public License as published by
|
||||
+* the Free Software Foundation, either version 3 of the License, or
|
||||
+* any later version.
|
||||
+* This program is distributed in the hope that it will be useful,
|
||||
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+* GNU General Public License for more details.
|
||||
+* You should have received a copy of the GNU General Public License
|
||||
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+*/
|
||||
+
|
||||
+#ifndef CONSTANT_H
|
||||
+#define CONSTANT_H
|
||||
+
|
||||
+namespace Constant {
|
||||
+const int WINDOW_MIN_WIDTH = 900;
|
||||
+const int WINDOW_MIN_HEIGHT = 750;
|
||||
+}; // namespace Constant
|
||||
+
|
||||
+#endif
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 10c7725..bd5b407 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "settings.h"
|
||||
#include "gui/main_window.h"
|
||||
#include "common/perf.h"
|
||||
+#include "constant.h"
|
||||
|
||||
#include <DApplication>
|
||||
#include <DApplicationSettings>
|
||||
@@ -85,7 +86,7 @@ int main(int argc, char *argv[])
|
||||
&DApplication::newInstanceStarted,
|
||||
&mw,
|
||||
&MainWindow::activateWindow);
|
||||
-
|
||||
+ mw.setMinimumSize(QSize(Constant::WINDOW_MIN_WIDTH, Constant::WINDOW_MIN_HEIGHT));
|
||||
Dtk::Widget::moveToCenter(&mw);
|
||||
mw.show();
|
||||
|
||||
--
|
||||
2.18.4
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
%global debug_package %{nil}
|
||||
%define pkgrelease 5
|
||||
%define pkgrelease 6
|
||||
%if 0%{?openeuler}
|
||||
%define specrelease %{pkgrelease}
|
||||
%else
|
||||
@ -17,6 +17,7 @@ URL: https://github.com/linuxdeepin/deepin-system-monitor
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: 0001-procps-ng-update-4.0.0.patch
|
||||
Patch1: 0002-feat-fix-strip.patch
|
||||
Patch2: 0003-Fix-incomplete-display-of-the-system-monitor-when-th.patch
|
||||
|
||||
BuildRequires: qt5-devel
|
||||
BuildRequires: cmake
|
||||
@ -106,6 +107,9 @@ fi
|
||||
%{_datadir}/deepin-manual/manual-assets/application/deepin-system-monitor/system-monitor/*
|
||||
|
||||
%changelog
|
||||
* Thu Apr 06 2023 yangxianzhao <yangxianzhao@uniontech.com> - 5.8.11-6
|
||||
- Fix incomplete display of the system monitor when the resolution is 1020 * 768
|
||||
|
||||
* Wed Mar 15 2023 liweiganga <liweiganga@uniontech.com> - 5.8.11-5
|
||||
- feat: fix strip
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user