diff --git a/0001-add-storage-check.patch b/0001-add-storage-check.patch deleted file mode 100644 index 9d12770e45d654d4be63d25afa1f003741fa79f2..0000000000000000000000000000000000000000 --- a/0001-add-storage-check.patch +++ /dev/null @@ -1,47 +0,0 @@ -From a95dab7b1c386a993e77c17091b8c7a55db711ef Mon Sep 17 00:00:00 2001 -From: tanyulong -Date: Thu, 28 Oct 2021 11:53:35 +0800 -Subject: [PATCH] add storage check - ---- - debian/source/format | 2 +- - src/linebandwith.cpp | 2 +- - src/singleProcessNet/inode2prog.cpp | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/debian/source/format b/debian/source/format -index 89ae9db..163aaf8 100755 ---- a/debian/source/format -+++ b/debian/source/format -@@ -1 +1 @@ --3.0 (native) -+3.0 (quilt) -diff --git a/src/linebandwith.cpp b/src/linebandwith.cpp -index 4c5d6e2..95f81f6 100755 ---- a/src/linebandwith.cpp -+++ b/src/linebandwith.cpp -@@ -39,7 +39,7 @@ QString lineBandwith::new_count(qint64 count ,int pid) - // quint64 bandwith = count-count_prev; - qint64 bandwith = count - countMap[pid]; - qDebug()<<"count---yayaya" < +Date: Mon, 5 Dec 2022 17:19:20 +0800 +Subject: [PATCH] fix compile error of ukui-system-monitor + +--- + ukui-system-monitor.pro | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/ukui-system-monitor.pro b/ukui-system-monitor.pro +index e2999fb..7891cda 100644 +--- a/ukui-system-monitor.pro ++++ b/ukui-system-monitor.pro +@@ -4,3 +4,14 @@ TEMPLATE = subdirs + + SUBDIRS = \ + src \ ++ ++guide.files += data/kylin-system-monitor/* ++guide.path = /usr/share/kylin-user-guide/data/guide ++ ++translation.files += src/translation/ukui-system-monitor*.qm ++translation.path = /usr/share/ukui-system-monitor/translations/ ++ ++ ++INSTALLS += guide \ ++ translation ++ +-- +2.33.0 + diff --git a/0001-modify-version-is-pull.patch b/0001-modify-version-is-pull.patch new file mode 100644 index 0000000000000000000000000000000000000000..abe31905297240d552692b1bccaed8eae36e1cee --- /dev/null +++ b/0001-modify-version-is-pull.patch @@ -0,0 +1,38 @@ +From bc027c4e8282a07db893c71f0b5ea72701e99bc3 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Mon, 31 Oct 2022 11:30:15 +0800 +Subject: [PATCH] modify version is pull + +--- + src/util.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/util.cpp b/src/util.cpp +index c79d6db..6e88b86 100644 +--- a/src/util.cpp ++++ b/src/util.cpp +@@ -501,17 +501,17 @@ QString getUsmVersion() + QString versionText; + QProcess proc; + QStringList options; +- options << "-l" << "|" << "grep" << "ukui-system-monitor"; +- proc.start("dpkg", options); ++ options << "-qa" << "|" << "grep" << "ukui-system-monitor"; ++ proc.start("rpm", options); + proc.waitForFinished(); + QString dpkgInfo = proc.readAll(); + QStringList infoList = dpkgInfo.split("\n"); + for (int n = 0; n < infoList.size(); n++) { + QString strInfoLine = infoList[n]; + if (strInfoLine.contains("ukui-system-monitor")) { +- QStringList lineInfoList = strInfoLine.split(QRegExp("[\\s]+")); ++ QStringList lineInfoList = strInfoLine.split(QRegExp("-")); + if (lineInfoList.size() >= 3) { +- versionText = lineInfoList[2]; ++ versionText = lineInfoList[3]; + } + break; + } +-- +2.36.1 + diff --git a/0001-removes-transparency.patch b/0001-removes-transparency.patch deleted file mode 100644 index 617f6f6d3b4c85040f930b2c3459e800edeed7fa..0000000000000000000000000000000000000000 --- a/0001-removes-transparency.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 25409b7ebcfaa987ba38a3c8f5481b58362b4df4 Mon Sep 17 00:00:00 2001 -From: myshow <296570182@qq.com> -Date: Wed, 16 Dec 2020 16:37:42 +0800 -Subject: [PATCH] removes-transparency - ---- - src/propertiesdialog.cpp | 2 +- - src/systemmonitor.cpp | 2 +- - widgets/mydialog.cpp | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/propertiesdialog.cpp b/src/propertiesdialog.cpp -index c0c4b88..90fcd60 100644 ---- a/src/propertiesdialog.cpp -+++ b/src/propertiesdialog.cpp -@@ -43,7 +43,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, pid_t processId) : QDialog(p - this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint/* | Qt::WindowCloseButtonHint*/| Qt::WindowStaysOnTopHint); - // this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid - -- this->setAttribute(Qt::WA_TranslucentBackground); -+// this->setAttribute(Qt::WA_TranslucentBackground); - this->setAttribute(Qt::WA_Resized, false); - // this->setMaximumSize(480, 600); - // this->setMinimumWidth(320); -diff --git a/src/systemmonitor.cpp b/src/systemmonitor.cpp -index 0aa8055..ac1af9a 100644 ---- a/src/systemmonitor.cpp -+++ b/src/systemmonitor.cpp -@@ -61,7 +61,7 @@ SystemMonitor::SystemMonitor(QWidget *parent) - this->setObjectName("SystemMonitor"); - - this->setWindowFlags(Qt::FramelessWindowHint); //set for no windowhint -- this->setAttribute(Qt::WA_TranslucentBackground);//背景透明 -+// this->setAttribute(Qt::WA_TranslucentBackground);//背景透明 - this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); - // QPainterPath path; - // auto rect = this->rect(); -diff --git a/widgets/mydialog.cpp b/widgets/mydialog.cpp -index a969f68..d940746 100644 ---- a/widgets/mydialog.cpp -+++ b/widgets/mydialog.cpp -@@ -39,7 +39,7 @@ MyDialog::MyDialog(const QString &title, const QString &message, QWidget *parent - this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint | Qt::WindowCloseButtonHint); - // this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid - -- this->setAttribute(Qt::WA_TranslucentBackground); -+// this->setAttribute(Qt::WA_TranslucentBackground); - // this->setAttribute(Qt::WA_DeleteOnClose, false); - this->setAttribute(Qt::WA_Resized, false); - --- -2.29.2.windows.2 - diff --git a/0002-Fix-the-wrong-maintainer-and-update-changelog.patch b/0002-Fix-the-wrong-maintainer-and-update-changelog.patch deleted file mode 100644 index 767e2e4f96622ef43e85a7e5b30e6377f4b522ab..0000000000000000000000000000000000000000 --- a/0002-Fix-the-wrong-maintainer-and-update-changelog.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 580fc9f00e1a09070d2bcadf5b0bdae494f1899c Mon Sep 17 00:00:00 2001 -From: tanyulong -Date: Tue, 2 Nov 2021 11:04:39 +0800 -Subject: [PATCH] Fix the wrong maintainer and update changelog - ---- - debian/changelog | 8 ++++++++ - debian/control | 2 +- - 2 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/debian/changelog b/debian/changelog -index f29986e..537cb5e 100755 ---- a/debian/changelog -+++ b/debian/changelog -@@ -1,3 +1,11 @@ -+ukui-system-monitor (1.0.2-1) unstable; urgency=medium -+ -+ * New upstream release. -+ * d/control: Remove useless depends to allow migration. -+ -+ -- handsome_feng Thu, 26 Nov 2020 10:12:45 -+ -+ - ukui-system-monitor (1.0.0-1+1027) focal; urgency=medium - - * Daily build. -diff --git a/debian/control b/debian/control -index e79418e..4afd80c 100755 ---- a/debian/control -+++ b/debian/control -@@ -1,7 +1,7 @@ - Source: ukui-system-monitor - Section: x11 - Priority: optional --Maintainer: Ubuntu Developers -+Maintainer: Kylin Team - Uploaders: handsome_feng - Build-Depends: debhelper-compat (= 12), - qtbase5-dev (>= 5.1), --- -2.30.0 - diff --git a/0003-Add-libglib2.0-bin-to-Depends.patch b/0003-Add-libglib2.0-bin-to-Depends.patch deleted file mode 100644 index 1ccf1cb2c3c4292f0d1f60e8d92f196b8a0c0a02..0000000000000000000000000000000000000000 --- a/0003-Add-libglib2.0-bin-to-Depends.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 71c9acb2cff528bb91ff93fe72c275a31dc5dc01 Mon Sep 17 00:00:00 2001 -From: tanyulong -Date: Fri, 5 Nov 2021 16:48:06 +0800 -Subject: [PATCH] Add libglib2.0-bin to Depends - ---- - debian/control | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/debian/control b/debian/control -index 4afd80c..14bba73 100755 ---- a/debian/control -+++ b/debian/control -@@ -34,6 +34,7 @@ Depends: inotify-hookable, - cpufrequtils, - pciutils, - libcap2-bin, -+ libglib2.0-bin, - ${misc:Depends}, - ${shlibs:Depends} - Description: Monitor for UKUI desktop environment --- -2.30.0 - diff --git a/0004-Update-README.md.patch b/0004-Update-README.md.patch deleted file mode 100644 index 89dd2364df17de3eaaca975c20f7119b73de26ef..0000000000000000000000000000000000000000 --- a/0004-Update-README.md.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 75102e2e43b915102f523e1c9e55bc9e8c0bb8e4 Mon Sep 17 00:00:00 2001 -From: tanyulong -Date: Fri, 5 Nov 2021 17:05:20 +0800 -Subject: [PATCH] Update README.md - ---- - README.md | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/README.md b/README.md -index e193c63..fc14844 100755 ---- a/README.md -+++ b/README.md -@@ -4,8 +4,8 @@ running processes, It also provides an overview of the resources - (such as CPU and memory) and File Systems on your system. - - ## Build --./autogen.sh --make -+mkdir build -+qmake .. - sudo make install - - ## Bug report --- -2.30.0 - diff --git a/0005-Remove-LICENSE-which-is-same-with-COPYING.patch b/0005-Remove-LICENSE-which-is-same-with-COPYING.patch deleted file mode 100644 index 22ccaa4cca9ee20d177ae902127b82722d6bfc7e..0000000000000000000000000000000000000000 --- a/0005-Remove-LICENSE-which-is-same-with-COPYING.patch +++ /dev/null @@ -1,693 +0,0 @@ -From 7c04e661f8356dfdf9bebffd6cddcd52c085f733 Mon Sep 17 00:00:00 2001 -From: tanyulong -Date: Tue, 9 Nov 2021 19:42:23 +0800 -Subject: [PATCH] Remove LICENSE which is same with COPYING - ---- - LICENSE | 674 -------------------------------------------------------- - 1 file changed, 674 deletions(-) - delete mode 100755 LICENSE - -diff --git a/LICENSE b/LICENSE -deleted file mode 100755 -index f288702..0000000 ---- a/LICENSE -+++ /dev/null -@@ -1,674 +0,0 @@ -- GNU GENERAL PUBLIC LICENSE -- Version 3, 29 June 2007 -- -- Copyright (C) 2007 Free Software Foundation, Inc. -- Everyone is permitted to copy and distribute verbatim copies -- of this license document, but changing it is not allowed. -- -- Preamble -- -- The GNU General Public License is a free, copyleft license for --software and other kinds of works. -- -- The licenses for most software and other practical works are designed --to take away your freedom to share and change the works. By contrast, --the GNU General Public License is intended to guarantee your freedom to --share and change all versions of a program--to make sure it remains free --software for all its users. We, the Free Software Foundation, use the --GNU General Public License for most of our software; it applies also to --any other work released this way by its authors. You can apply it to --your programs, too. -- -- When we speak of free software, we are referring to freedom, not --price. Our General Public Licenses are designed to make sure that you --have the freedom to distribute copies of free software (and charge for --them if you wish), that you receive source code or can get it if you --want it, that you can change the software or use pieces of it in new --free programs, and that you know you can do these things. -- -- To protect your rights, we need to prevent others from denying you --these rights or asking you to surrender the rights. Therefore, you have --certain responsibilities if you distribute copies of the software, or if --you modify it: responsibilities to respect the freedom of others. -- -- For example, if you distribute copies of such a program, whether --gratis or for a fee, you must pass on to the recipients the same --freedoms that you received. You must make sure that they, too, receive --or can get the source code. And you must show them these terms so they --know their rights. -- -- Developers that use the GNU GPL protect your rights with two steps: --(1) assert copyright on the software, and (2) offer you this License --giving you legal permission to copy, distribute and/or modify it. -- -- For the developers' and authors' protection, the GPL clearly explains --that there is no warranty for this free software. For both users' and --authors' sake, the GPL requires that modified versions be marked as --changed, so that their problems will not be attributed erroneously to --authors of previous versions. -- -- Some devices are designed to deny users access to install or run --modified versions of the software inside them, although the manufacturer --can do so. This is fundamentally incompatible with the aim of --protecting users' freedom to change the software. The systematic --pattern of such abuse occurs in the area of products for individuals to --use, which is precisely where it is most unacceptable. Therefore, we --have designed this version of the GPL to prohibit the practice for those --products. If such problems arise substantially in other domains, we --stand ready to extend this provision to those domains in future versions --of the GPL, as needed to protect the freedom of users. -- -- Finally, every program is threatened constantly by software patents. --States should not allow patents to restrict development and use of --software on general-purpose computers, but in those that do, we wish to --avoid the special danger that patents applied to a free program could --make it effectively proprietary. To prevent this, the GPL assures that --patents cannot be used to render the program non-free. -- -- The precise terms and conditions for copying, distribution and --modification follow. -- -- TERMS AND CONDITIONS -- -- 0. Definitions. -- -- "This License" refers to version 3 of the GNU General Public License. -- -- "Copyright" also means copyright-like laws that apply to other kinds of --works, such as semiconductor masks. -- -- "The Program" refers to any copyrightable work licensed under this --License. Each licensee is addressed as "you". "Licensees" and --"recipients" may be individuals or organizations. -- -- To "modify" a work means to copy from or adapt all or part of the work --in a fashion requiring copyright permission, other than the making of an --exact copy. The resulting work is called a "modified version" of the --earlier work or a work "based on" the earlier work. -- -- A "covered work" means either the unmodified Program or a work based --on the Program. -- -- To "propagate" a work means to do anything with it that, without --permission, would make you directly or secondarily liable for --infringement under applicable copyright law, except executing it on a --computer or modifying a private copy. Propagation includes copying, --distribution (with or without modification), making available to the --public, and in some countries other activities as well. -- -- To "convey" a work means any kind of propagation that enables other --parties to make or receive copies. Mere interaction with a user through --a computer network, with no transfer of a copy, is not conveying. -- -- An interactive user interface displays "Appropriate Legal Notices" --to the extent that it includes a convenient and prominently visible --feature that (1) displays an appropriate copyright notice, and (2) --tells the user that there is no warranty for the work (except to the --extent that warranties are provided), that licensees may convey the --work under this License, and how to view a copy of this License. If --the interface presents a list of user commands or options, such as a --menu, a prominent item in the list meets this criterion. -- -- 1. Source Code. -- -- The "source code" for a work means the preferred form of the work --for making modifications to it. "Object code" means any non-source --form of a work. -- -- A "Standard Interface" means an interface that either is an official --standard defined by a recognized standards body, or, in the case of --interfaces specified for a particular programming language, one that --is widely used among developers working in that language. -- -- The "System Libraries" of an executable work include anything, other --than the work as a whole, that (a) is included in the normal form of --packaging a Major Component, but which is not part of that Major --Component, and (b) serves only to enable use of the work with that --Major Component, or to implement a Standard Interface for which an --implementation is available to the public in source code form. A --"Major Component", in this context, means a major essential component --(kernel, window system, and so on) of the specific operating system --(if any) on which the executable work runs, or a compiler used to --produce the work, or an object code interpreter used to run it. -- -- The "Corresponding Source" for a work in object code form means all --the source code needed to generate, install, and (for an executable --work) run the object code and to modify the work, including scripts to --control those activities. However, it does not include the work's --System Libraries, or general-purpose tools or generally available free --programs which are used unmodified in performing those activities but --which are not part of the work. For example, Corresponding Source --includes interface definition files associated with source files for --the work, and the source code for shared libraries and dynamically --linked subprograms that the work is specifically designed to require, --such as by intimate data communication or control flow between those --subprograms and other parts of the work. -- -- The Corresponding Source need not include anything that users --can regenerate automatically from other parts of the Corresponding --Source. -- -- The Corresponding Source for a work in source code form is that --same work. -- -- 2. Basic Permissions. -- -- All rights granted under this License are granted for the term of --copyright on the Program, and are irrevocable provided the stated --conditions are met. This License explicitly affirms your unlimited --permission to run the unmodified Program. The output from running a --covered work is covered by this License only if the output, given its --content, constitutes a covered work. This License acknowledges your --rights of fair use or other equivalent, as provided by copyright law. -- -- You may make, run and propagate covered works that you do not --convey, without conditions so long as your license otherwise remains --in force. You may convey covered works to others for the sole purpose --of having them make modifications exclusively for you, or provide you --with facilities for running those works, provided that you comply with --the terms of this License in conveying all material for which you do --not control copyright. Those thus making or running the covered works --for you must do so exclusively on your behalf, under your direction --and control, on terms that prohibit them from making any copies of --your copyrighted material outside their relationship with you. -- -- Conveying under any other circumstances is permitted solely under --the conditions stated below. Sublicensing is not allowed; section 10 --makes it unnecessary. -- -- 3. Protecting Users' Legal Rights From Anti-Circumvention Law. -- -- No covered work shall be deemed part of an effective technological --measure under any applicable law fulfilling obligations under article --11 of the WIPO copyright treaty adopted on 20 December 1996, or --similar laws prohibiting or restricting circumvention of such --measures. -- -- When you convey a covered work, you waive any legal power to forbid --circumvention of technological measures to the extent such circumvention --is effected by exercising rights under this License with respect to --the covered work, and you disclaim any intention to limit operation or --modification of the work as a means of enforcing, against the work's --users, your or third parties' legal rights to forbid circumvention of --technological measures. -- -- 4. Conveying Verbatim Copies. -- -- You may convey verbatim copies of the Program's source code as you --receive it, in any medium, provided that you conspicuously and --appropriately publish on each copy an appropriate copyright notice; --keep intact all notices stating that this License and any --non-permissive terms added in accord with section 7 apply to the code; --keep intact all notices of the absence of any warranty; and give all --recipients a copy of this License along with the Program. -- -- You may charge any price or no price for each copy that you convey, --and you may offer support or warranty protection for a fee. -- -- 5. Conveying Modified Source Versions. -- -- You may convey a work based on the Program, or the modifications to --produce it from the Program, in the form of source code under the --terms of section 4, provided that you also meet all of these conditions: -- -- a) The work must carry prominent notices stating that you modified -- it, and giving a relevant date. -- -- b) The work must carry prominent notices stating that it is -- released under this License and any conditions added under section -- 7. This requirement modifies the requirement in section 4 to -- "keep intact all notices". -- -- c) You must license the entire work, as a whole, under this -- License to anyone who comes into possession of a copy. This -- License will therefore apply, along with any applicable section 7 -- additional terms, to the whole of the work, and all its parts, -- regardless of how they are packaged. This License gives no -- permission to license the work in any other way, but it does not -- invalidate such permission if you have separately received it. -- -- d) If the work has interactive user interfaces, each must display -- Appropriate Legal Notices; however, if the Program has interactive -- interfaces that do not display Appropriate Legal Notices, your -- work need not make them do so. -- -- A compilation of a covered work with other separate and independent --works, which are not by their nature extensions of the covered work, --and which are not combined with it such as to form a larger program, --in or on a volume of a storage or distribution medium, is called an --"aggregate" if the compilation and its resulting copyright are not --used to limit the access or legal rights of the compilation's users --beyond what the individual works permit. Inclusion of a covered work --in an aggregate does not cause this License to apply to the other --parts of the aggregate. -- -- 6. Conveying Non-Source Forms. -- -- You may convey a covered work in object code form under the terms --of sections 4 and 5, provided that you also convey the --machine-readable Corresponding Source under the terms of this License, --in one of these ways: -- -- a) Convey the object code in, or embodied in, a physical product -- (including a physical distribution medium), accompanied by the -- Corresponding Source fixed on a durable physical medium -- customarily used for software interchange. -- -- b) Convey the object code in, or embodied in, a physical product -- (including a physical distribution medium), accompanied by a -- written offer, valid for at least three years and valid for as -- long as you offer spare parts or customer support for that product -- model, to give anyone who possesses the object code either (1) a -- copy of the Corresponding Source for all the software in the -- product that is covered by this License, on a durable physical -- medium customarily used for software interchange, for a price no -- more than your reasonable cost of physically performing this -- conveying of source, or (2) access to copy the -- Corresponding Source from a network server at no charge. -- -- c) Convey individual copies of the object code with a copy of the -- written offer to provide the Corresponding Source. This -- alternative is allowed only occasionally and noncommercially, and -- only if you received the object code with such an offer, in accord -- with subsection 6b. -- -- d) Convey the object code by offering access from a designated -- place (gratis or for a charge), and offer equivalent access to the -- Corresponding Source in the same way through the same place at no -- further charge. You need not require recipients to copy the -- Corresponding Source along with the object code. If the place to -- copy the object code is a network server, the Corresponding Source -- may be on a different server (operated by you or a third party) -- that supports equivalent copying facilities, provided you maintain -- clear directions next to the object code saying where to find the -- Corresponding Source. Regardless of what server hosts the -- Corresponding Source, you remain obligated to ensure that it is -- available for as long as needed to satisfy these requirements. -- -- e) Convey the object code using peer-to-peer transmission, provided -- you inform other peers where the object code and Corresponding -- Source of the work are being offered to the general public at no -- charge under subsection 6d. -- -- A separable portion of the object code, whose source code is excluded --from the Corresponding Source as a System Library, need not be --included in conveying the object code work. -- -- A "User Product" is either (1) a "consumer product", which means any --tangible personal property which is normally used for personal, family, --or household purposes, or (2) anything designed or sold for incorporation --into a dwelling. In determining whether a product is a consumer product, --doubtful cases shall be resolved in favor of coverage. For a particular --product received by a particular user, "normally used" refers to a --typical or common use of that class of product, regardless of the status --of the particular user or of the way in which the particular user --actually uses, or expects or is expected to use, the product. A product --is a consumer product regardless of whether the product has substantial --commercial, industrial or non-consumer uses, unless such uses represent --the only significant mode of use of the product. -- -- "Installation Information" for a User Product means any methods, --procedures, authorization keys, or other information required to install --and execute modified versions of a covered work in that User Product from --a modified version of its Corresponding Source. The information must --suffice to ensure that the continued functioning of the modified object --code is in no case prevented or interfered with solely because --modification has been made. -- -- If you convey an object code work under this section in, or with, or --specifically for use in, a User Product, and the conveying occurs as --part of a transaction in which the right of possession and use of the --User Product is transferred to the recipient in perpetuity or for a --fixed term (regardless of how the transaction is characterized), the --Corresponding Source conveyed under this section must be accompanied --by the Installation Information. But this requirement does not apply --if neither you nor any third party retains the ability to install --modified object code on the User Product (for example, the work has --been installed in ROM). -- -- The requirement to provide Installation Information does not include a --requirement to continue to provide support service, warranty, or updates --for a work that has been modified or installed by the recipient, or for --the User Product in which it has been modified or installed. Access to a --network may be denied when the modification itself materially and --adversely affects the operation of the network or violates the rules and --protocols for communication across the network. -- -- Corresponding Source conveyed, and Installation Information provided, --in accord with this section must be in a format that is publicly --documented (and with an implementation available to the public in --source code form), and must require no special password or key for --unpacking, reading or copying. -- -- 7. Additional Terms. -- -- "Additional permissions" are terms that supplement the terms of this --License by making exceptions from one or more of its conditions. --Additional permissions that are applicable to the entire Program shall --be treated as though they were included in this License, to the extent --that they are valid under applicable law. If additional permissions --apply only to part of the Program, that part may be used separately --under those permissions, but the entire Program remains governed by --this License without regard to the additional permissions. -- -- When you convey a copy of a covered work, you may at your option --remove any additional permissions from that copy, or from any part of --it. (Additional permissions may be written to require their own --removal in certain cases when you modify the work.) You may place --additional permissions on material, added by you to a covered work, --for which you have or can give appropriate copyright permission. -- -- Notwithstanding any other provision of this License, for material you --add to a covered work, you may (if authorized by the copyright holders of --that material) supplement the terms of this License with terms: -- -- a) Disclaiming warranty or limiting liability differently from the -- terms of sections 15 and 16 of this License; or -- -- b) Requiring preservation of specified reasonable legal notices or -- author attributions in that material or in the Appropriate Legal -- Notices displayed by works containing it; or -- -- c) Prohibiting misrepresentation of the origin of that material, or -- requiring that modified versions of such material be marked in -- reasonable ways as different from the original version; or -- -- d) Limiting the use for publicity purposes of names of licensors or -- authors of the material; or -- -- e) Declining to grant rights under trademark law for use of some -- trade names, trademarks, or service marks; or -- -- f) Requiring indemnification of licensors and authors of that -- material by anyone who conveys the material (or modified versions of -- it) with contractual assumptions of liability to the recipient, for -- any liability that these contractual assumptions directly impose on -- those licensors and authors. -- -- All other non-permissive additional terms are considered "further --restrictions" within the meaning of section 10. If the Program as you --received it, or any part of it, contains a notice stating that it is --governed by this License along with a term that is a further --restriction, you may remove that term. If a license document contains --a further restriction but permits relicensing or conveying under this --License, you may add to a covered work material governed by the terms --of that license document, provided that the further restriction does --not survive such relicensing or conveying. -- -- If you add terms to a covered work in accord with this section, you --must place, in the relevant source files, a statement of the --additional terms that apply to those files, or a notice indicating --where to find the applicable terms. -- -- Additional terms, permissive or non-permissive, may be stated in the --form of a separately written license, or stated as exceptions; --the above requirements apply either way. -- -- 8. Termination. -- -- You may not propagate or modify a covered work except as expressly --provided under this License. Any attempt otherwise to propagate or --modify it is void, and will automatically terminate your rights under --this License (including any patent licenses granted under the third --paragraph of section 11). -- -- However, if you cease all violation of this License, then your --license from a particular copyright holder is reinstated (a) --provisionally, unless and until the copyright holder explicitly and --finally terminates your license, and (b) permanently, if the copyright --holder fails to notify you of the violation by some reasonable means --prior to 60 days after the cessation. -- -- Moreover, your license from a particular copyright holder is --reinstated permanently if the copyright holder notifies you of the --violation by some reasonable means, this is the first time you have --received notice of violation of this License (for any work) from that --copyright holder, and you cure the violation prior to 30 days after --your receipt of the notice. -- -- Termination of your rights under this section does not terminate the --licenses of parties who have received copies or rights from you under --this License. If your rights have been terminated and not permanently --reinstated, you do not qualify to receive new licenses for the same --material under section 10. -- -- 9. Acceptance Not Required for Having Copies. -- -- You are not required to accept this License in order to receive or --run a copy of the Program. Ancillary propagation of a covered work --occurring solely as a consequence of using peer-to-peer transmission --to receive a copy likewise does not require acceptance. However, --nothing other than this License grants you permission to propagate or --modify any covered work. These actions infringe copyright if you do --not accept this License. Therefore, by modifying or propagating a --covered work, you indicate your acceptance of this License to do so. -- -- 10. Automatic Licensing of Downstream Recipients. -- -- Each time you convey a covered work, the recipient automatically --receives a license from the original licensors, to run, modify and --propagate that work, subject to this License. You are not responsible --for enforcing compliance by third parties with this License. -- -- An "entity transaction" is a transaction transferring control of an --organization, or substantially all assets of one, or subdividing an --organization, or merging organizations. If propagation of a covered --work results from an entity transaction, each party to that --transaction who receives a copy of the work also receives whatever --licenses to the work the party's predecessor in interest had or could --give under the previous paragraph, plus a right to possession of the --Corresponding Source of the work from the predecessor in interest, if --the predecessor has it or can get it with reasonable efforts. -- -- You may not impose any further restrictions on the exercise of the --rights granted or affirmed under this License. For example, you may --not impose a license fee, royalty, or other charge for exercise of --rights granted under this License, and you may not initiate litigation --(including a cross-claim or counterclaim in a lawsuit) alleging that --any patent claim is infringed by making, using, selling, offering for --sale, or importing the Program or any portion of it. -- -- 11. Patents. -- -- A "contributor" is a copyright holder who authorizes use under this --License of the Program or a work on which the Program is based. The --work thus licensed is called the contributor's "contributor version". -- -- A contributor's "essential patent claims" are all patent claims --owned or controlled by the contributor, whether already acquired or --hereafter acquired, that would be infringed by some manner, permitted --by this License, of making, using, or selling its contributor version, --but do not include claims that would be infringed only as a --consequence of further modification of the contributor version. For --purposes of this definition, "control" includes the right to grant --patent sublicenses in a manner consistent with the requirements of --this License. -- -- Each contributor grants you a non-exclusive, worldwide, royalty-free --patent license under the contributor's essential patent claims, to --make, use, sell, offer for sale, import and otherwise run, modify and --propagate the contents of its contributor version. -- -- In the following three paragraphs, a "patent license" is any express --agreement or commitment, however denominated, not to enforce a patent --(such as an express permission to practice a patent or covenant not to --sue for patent infringement). To "grant" such a patent license to a --party means to make such an agreement or commitment not to enforce a --patent against the party. -- -- If you convey a covered work, knowingly relying on a patent license, --and the Corresponding Source of the work is not available for anyone --to copy, free of charge and under the terms of this License, through a --publicly available network server or other readily accessible means, --then you must either (1) cause the Corresponding Source to be so --available, or (2) arrange to deprive yourself of the benefit of the --patent license for this particular work, or (3) arrange, in a manner --consistent with the requirements of this License, to extend the patent --license to downstream recipients. "Knowingly relying" means you have --actual knowledge that, but for the patent license, your conveying the --covered work in a country, or your recipient's use of the covered work --in a country, would infringe one or more identifiable patents in that --country that you have reason to believe are valid. -- -- If, pursuant to or in connection with a single transaction or --arrangement, you convey, or propagate by procuring conveyance of, a --covered work, and grant a patent license to some of the parties --receiving the covered work authorizing them to use, propagate, modify --or convey a specific copy of the covered work, then the patent license --you grant is automatically extended to all recipients of the covered --work and works based on it. -- -- A patent license is "discriminatory" if it does not include within --the scope of its coverage, prohibits the exercise of, or is --conditioned on the non-exercise of one or more of the rights that are --specifically granted under this License. You may not convey a covered --work if you are a party to an arrangement with a third party that is --in the business of distributing software, under which you make payment --to the third party based on the extent of your activity of conveying --the work, and under which the third party grants, to any of the --parties who would receive the covered work from you, a discriminatory --patent license (a) in connection with copies of the covered work --conveyed by you (or copies made from those copies), or (b) primarily --for and in connection with specific products or compilations that --contain the covered work, unless you entered into that arrangement, --or that patent license was granted, prior to 28 March 2007. -- -- Nothing in this License shall be construed as excluding or limiting --any implied license or other defenses to infringement that may --otherwise be available to you under applicable patent law. -- -- 12. No Surrender of Others' Freedom. -- -- If conditions are imposed on you (whether by court order, agreement or --otherwise) that contradict the conditions of this License, they do not --excuse you from the conditions of this License. If you cannot convey a --covered work so as to satisfy simultaneously your obligations under this --License and any other pertinent obligations, then as a consequence you may --not convey it at all. For example, if you agree to terms that obligate you --to collect a royalty for further conveying from those to whom you convey --the Program, the only way you could satisfy both those terms and this --License would be to refrain entirely from conveying the Program. -- -- 13. Use with the GNU Affero General Public License. -- -- Notwithstanding any other provision of this License, you have --permission to link or combine any covered work with a work licensed --under version 3 of the GNU Affero General Public License into a single --combined work, and to convey the resulting work. The terms of this --License will continue to apply to the part which is the covered work, --but the special requirements of the GNU Affero General Public License, --section 13, concerning interaction through a network will apply to the --combination as such. -- -- 14. Revised Versions of this License. -- -- The Free Software Foundation may publish revised and/or new versions of --the GNU General Public License from time to time. Such new versions will --be similar in spirit to the present version, but may differ in detail to --address new problems or concerns. -- -- Each version is given a distinguishing version number. If the --Program specifies that a certain numbered version of the GNU General --Public License "or any later version" applies to it, you have the --option of following the terms and conditions either of that numbered --version or of any later version published by the Free Software --Foundation. If the Program does not specify a version number of the --GNU General Public License, you may choose any version ever published --by the Free Software Foundation. -- -- If the Program specifies that a proxy can decide which future --versions of the GNU General Public License can be used, that proxy's --public statement of acceptance of a version permanently authorizes you --to choose that version for the Program. -- -- Later license versions may give you additional or different --permissions. However, no additional obligations are imposed on any --author or copyright holder as a result of your choosing to follow a --later version. -- -- 15. Disclaimer of Warranty. -- -- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY --APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT --HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY --OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, --THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR --PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM --IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF --ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -- -- 16. Limitation of Liability. -- -- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING --WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS --THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY --GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE --USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF --DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD --PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), --EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF --SUCH DAMAGES. -- -- 17. Interpretation of Sections 15 and 16. -- -- If the disclaimer of warranty and limitation of liability provided --above cannot be given local legal effect according to their terms, --reviewing courts shall apply local law that most closely approximates --an absolute waiver of all civil liability in connection with the --Program, unless a warranty or assumption of liability accompanies a --copy of the Program in return for a fee. -- -- END OF TERMS AND CONDITIONS -- -- How to Apply These Terms to Your New Programs -- -- If you develop a new program, and you want it to be of the greatest --possible use to the public, the best way to achieve this is to make it --free software which everyone can redistribute and change under these terms. -- -- To do so, attach the following notices to the program. It is safest --to attach them to the start of each source file to most effectively --state the exclusion of warranty; and each file should have at least --the "copyright" line and a pointer to where the full notice is found. -- -- -- Copyright (C) -- -- 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 -- (at your option) 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 . -- --Also add information on how to contact you by electronic and paper mail. -- -- If the program does terminal interaction, make it output a short --notice like this when it starts in an interactive mode: -- -- Copyright (C) -- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -- This is free software, and you are welcome to redistribute it -- under certain conditions; type `show c' for details. -- --The hypothetical commands `show w' and `show c' should show the appropriate --parts of the General Public License. Of course, your program's commands --might be different; for a GUI interface, you would use an "about box". -- -- You should also get your employer (if you work as a programmer) or school, --if any, to sign a "copyright disclaimer" for the program, if necessary. --For more information on this, and how to apply and follow the GNU GPL, see --. -- -- The GNU General Public License does not permit incorporating your program --into proprietary programs. If your program is a subroutine library, you --may consider it more useful to permit linking proprietary applications with --the library. If this is what you want to do, use the GNU Lesser General --Public License instead of this License. But first, please read --. --- -2.30.0 - diff --git a/0006-Update-modification-record-in-changelog.patch b/0006-Update-modification-record-in-changelog.patch deleted file mode 100644 index 978a4ca5b6e5ce9f9beb9891b45a9848f5ad4c44..0000000000000000000000000000000000000000 --- a/0006-Update-modification-record-in-changelog.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 1a7245fcea5b08f5d1c84afdaf7b71ff84d050f2 Mon Sep 17 00:00:00 2001 -From: tanyulong -Date: Tue, 7 Dec 2021 20:56:01 +0800 -Subject: [PATCH] Update modification record in changelog - ---- - debian/changelog | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/debian/changelog b/debian/changelog -index 537cb5e..0d07172 100755 ---- a/debian/changelog -+++ b/debian/changelog -@@ -1,3 +1,16 @@ -+ukui-system-monitor (2.0.2-10) v101; urgency=medium -+ -+ * 优化功能:1、进程列表信息增加锁保护;2、进程列表的icon对象放到ui线程中处理 -+ * 修复bug:修复关于界面邮箱链接不可点击问题 -+ -+ -- Yang Min Sat, 06 Mar 2021 16:48:06 +0800 -+ -+ukui-system-monitor (2.0.2-9) v101; urgency=medium -+ -+ * 优化功能:优化进程列表显示 -+ * 修复bug:1、修复搜索输入框偶现不显示内容问题;2、修复触摸屏无法触摸点击问题 -+ -+ -- Yang Min Tue, 02 Mar 2021 16:57:00 +0800 - ukui-system-monitor (1.0.2-1) unstable; urgency=medium - - * New upstream release. --- -2.30.0 - diff --git a/0007-Fix-the-segmentfault-without-org.ukui.style.patch b/0007-Fix-the-segmentfault-without-org.ukui.style.patch deleted file mode 100644 index ca2cce0a0c8c75f2876d5da9e7223506ceabf434..0000000000000000000000000000000000000000 --- a/0007-Fix-the-segmentfault-without-org.ukui.style.patch +++ /dev/null @@ -1,877 +0,0 @@ -From a7e4e6a9dc65a51c2027f0fe2ca5d09acaf352a9 Mon Sep 17 00:00:00 2001 -From: pei-jiankang -Date: Tue, 21 Dec 2021 19:19:57 +0800 -Subject: [PATCH] Fix the segmentfault without org.ukui.style - ---- - src/cpuballwidget.cpp | 32 +++------------- - src/cpuratewidget.cpp | 32 ++++------------ - src/filesystemlistitem.cpp | 3 ++ - src/filesystemlistwidget.cpp | 9 +++-- - src/monitortitlewidget.cpp | 27 +++----------- - src/netcatogoryshow.cpp | 10 +++-- - src/networkflow.cpp | 10 ++--- - src/networkindicator.cpp | 10 +++-- - src/processlistitem.cpp | 11 +++--- - src/processlistwidget.cpp | 23 +++++++----- - src/resourcesindicator.cpp | 15 +++----- - src/src.pro | 10 ++--- - src/systemmonitor.cpp | 5 +++ - widgets/mysearchedit.cpp | 70 +++-------------------------------- - widgets/myunderlinebutton.cpp | 27 ++++---------- - 15 files changed, 91 insertions(+), 203 deletions(-) - -diff --git a/src/cpuballwidget.cpp b/src/cpuballwidget.cpp -index 2901a5c..6e3ff7c 100755 ---- a/src/cpuballwidget.cpp -+++ b/src/cpuballwidget.cpp -@@ -34,6 +34,7 @@ qreal gradientDistance(qreal x) - } - - CpuBallWidget::CpuBallWidget(QWidget *parent) : QWidget(parent) -+ , qtSettings(nullptr) - { - const QByteArray idd(THEME_QT_SCHEMA); - -@@ -92,16 +93,16 @@ CpuBallWidget::~CpuBallWidget() - - void CpuBallWidget::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { - if (key == "styleName") - { --// auto style = qtSettings->get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); - repaint(); - } - }); -@@ -113,34 +114,19 @@ void CpuBallWidget::loadWaveImage() - QImageReader frontReader(m_frontImagePath); - int w = frontReader.size().width(); - int h = frontReader.size().height(); --// w = w * this->width() / 100; --// h = h * this->height() / 100; - QImage image(w, h, QImage::Format_ARGB32_Premultiplied);//QImage::Format_ARGB32 - image.fill(Qt::transparent); //Qt::transparent - image.load(m_frontImagePath); -- /*QPainter painter(&image); --// painter.setCompositionMode(QPainter::CompositionMode_Source); --// painter.fillRect(image.rect(), Qt::transparent); --// painter.setCompositionMode(QPainter::CompositionMode_SourceOver); -- painter.drawImage(QPoint(0,0), image); -- painter.end();*/ - m_frontImage = image; - - QImageReader backReader(m_backimagePath); - w = backReader.size().width(); - h = backReader.size().height(); --// w = w * this->width() / 100; --// h = h * this->height() / 100; -+ - QImage backImage(w, h, QImage::Format_ARGB32_Premultiplied);//QImage::Format_ARGB32 - backImage = backImage.scaled(QSize(w, h), Qt::KeepAspectRatio, Qt::SmoothTransformation); - backImage.fill(Qt::transparent); - backImage.load(m_backimagePath); -- /*QPainter backPainter(&backImage); --// backPainter.setCompositionMode(QPainter::CompositionMode_Source); --// backPainter.fillRect(image.rect(), Qt::transparent); --// backPainter.setCompositionMode(QPainter::CompositionMode_SourceOver); -- backPainter.drawImage(QPoint(0,0), backImage); -- backPainter.end();*/ - m_backImage = backImage; - } - -@@ -161,7 +147,6 @@ void CpuBallWidget::onRepaintWaveImage() - } else { - m_waveTimer->stop(); - } --// this->update();//this->repaint(); - } - - //value:0 ~ 100 -@@ -214,13 +199,9 @@ void CpuBallWidget::paintEvent(QPaintEvent *) - } else if (currentPercent > 55) { - m_shadowEffect->setColor(QColor(255, 193, 37));//黄 - } else { --// m_shadowEffect->setColor(QColor(232, 232, 232, 127));//灰 the last parameters stands for the degree of the background --// m_shadowEffect->setColor(QColor(204,0,255,50)); - m_shadowEffect->setColor(QColor(255,255,255,255)); --// m_shadowEffect->setColor(palette().color(QPalette::Base)); - } - wavePainter.fillRect(waveRectImage.rect(), QColor(255, 255, 255, 50)); --// wavePainter.fillRect(waveRectImage.rect(),palette().color("QPalette::Base)"); - - //Step2:波浪区域 - //CompositionMode_SourceOver保证波浪出现的时候其背景为通明的 -@@ -248,7 +229,6 @@ void CpuBallWidget::paintEvent(QPaintEvent *) - QFont font = wavePainter.font(); - font.setPixelSize(40);//waveSize.height() * 20 / this->height() - wavePainter.setFont(font); --// wavePainter.setPen(Qt::white); - wavePainter.setPen(QPen(palette().color(QPalette::WindowText))); - wavePainter.drawText(QRect(rect.x(), rect.y() + rect.height()*2/3, rect.width(), rect.height()/3), Qt::AlignHCenter, m_progressText); - wavePainter.end(); -diff --git a/src/cpuratewidget.cpp b/src/cpuratewidget.cpp -index 4cdf485..cace1ae 100755 ---- a/src/cpuratewidget.cpp -+++ b/src/cpuratewidget.cpp -@@ -204,6 +204,7 @@ inline void readFile(const QString &fileName) - } - - CpuRateWidget::CpuRateWidget(QWidget *parent) : QWidget(parent) -+, qtSettings(nullptr) - { - const QByteArray idd(THEME_QT_SCHEMA); - if(QGSettings::isSchemaInstalled(idd)) -@@ -225,40 +226,23 @@ CpuRateWidget::CpuRateWidget(QWidget *parent) : QWidget(parent) - initThemeMode(); - - m_cpuBall->startTimer(); -- -- /*unsigned long runtime; -- unsigned long idletime; -- QString rate = getIdelRate(runtime, idletime); -- qDebug() << "rate="<get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); -- //repaint(); -- if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode =="ukui-white") -+ -+ if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode =="ukui-white") - { - m_cpuRateTitle->setStyleSheet("QLabel{background:transparent;font-size:12px;color:rgba(0,0,0,0.57);}"); //#999999 - m_cpuIdleRateTitle->setStyleSheet("QLabel{background:transparent;font-size:12px;color:rgba(0,0,0,0.57);}"); -diff --git a/src/filesystemlistitem.cpp b/src/filesystemlistitem.cpp -index 72d4193..d6ee7f3 100755 ---- a/src/filesystemlistitem.cpp -+++ b/src/filesystemlistitem.cpp -@@ -32,6 +32,7 @@ - - FileSystemListItem::FileSystemListItem(FileSystemData *info) - :fontSettings(nullptr) -+ ,qtSettings(nullptr) - { - m_data = info; - iconSize = 20; -@@ -69,8 +70,10 @@ FileSystemListItem::~FileSystemListItem() - void FileSystemListItem::initThemeMode() - { - if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; - return; - } -+ - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { -diff --git a/src/filesystemlistwidget.cpp b/src/filesystemlistwidget.cpp -index 45eb7ea..3deb69e 100755 ---- a/src/filesystemlistwidget.cpp -+++ b/src/filesystemlistwidget.cpp -@@ -44,6 +44,7 @@ FileSystemListWidget::FileSystemListWidget(QList toBeDisplayedColumns, QWi - ,m_mouseAtScrollArea(false) - ,m_mouseDragScrollbar(false) - ,fontSettings(nullptr) -+ ,qtSettings(nullptr) - { - const QByteArray idd(THEME_QT_SCHEMA); - -@@ -124,17 +125,17 @@ void FileSystemListWidget::clearItems() - - void FileSystemListWidget::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { - - if (key == "styleName") - { --// auto style = qtSettings->get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); - repaint(); - } - }); -diff --git a/src/monitortitlewidget.cpp b/src/monitortitlewidget.cpp -index 9fbcf5f..f81f636 100755 ---- a/src/monitortitlewidget.cpp -+++ b/src/monitortitlewidget.cpp -@@ -43,6 +43,7 @@ MonitorTitleWidget::MonitorTitleWidget(QSettings *settings, QWidget *parent) - :QFrame(parent) - ,proSettings(settings) - ,fontSettings(nullptr) -+ ,qtSettings(nullptr) - { - whichBox = new QList(); - const QByteArray idd(THEME_QT_SCHEMA); -@@ -81,32 +82,12 @@ MonitorTitleWidget::MonitorTitleWidget(QSettings *settings, QWidget *parent) - - initThemeMode(); - -- this->setWindowFlags(Qt::FramelessWindowHint);//this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint | Qt::WindowCloseButtonHint); --// this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid -+ this->setWindowFlags(Qt::FramelessWindowHint); - - installEventFilter(this); --// setMouseTracking(true); - setFixedHeight(MONITOR_TITLE_WIDGET_HEIGHT); - - this->setAutoFillBackground(true); --// this->setAttribute(Qt::WA_TranslucentBackground); -- --// QPalette palette; --// palette.setColor(QPalette::Background, QColor("#0d87ca")); --// this->setPalette(palette); --// this->setStyleSheet("QFrame{background:transparent;background-color:#0d87ca;border-radius:5px;border:1px solid red;}"); --// this->setStyleSheet("QFrame {padding: 5px 0;} QFrame:hover {background-color: rgba(255, 245, 250, 0.1);border-radius: 5px;}"); -- --// if(currentThemeMode == "ukui-white") --// { --// this->setObjectName("MonitorTitle"); --// this->setStyleSheet("QFrame#MonitorTitle{background:rgba(255,255,255,0.9);border-top-left-radius:6px;border-top-right-radius:6px;color: palette(windowText);}"); --// } --// else --// { --// this->setObjectName("MonitorTitle"); --// this->setStyleSheet("QFrame#MonitorTitle{background:rgba(13,14,14,0.9);border-top-left-radius:6px;border-top-right-radius:6px;color: palette(windowText);}"); --// } - - m_searchTimer = new QTimer(this); - m_searchTimer->setSingleShot(true); -@@ -118,6 +99,10 @@ MonitorTitleWidget::MonitorTitleWidget(QSettings *settings, QWidget *parent) - - void MonitorTitleWidget::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { -diff --git a/src/netcatogoryshow.cpp b/src/netcatogoryshow.cpp -index db59352..bbf22a1 100755 ---- a/src/netcatogoryshow.cpp -+++ b/src/netcatogoryshow.cpp -@@ -35,6 +35,7 @@ NetCatogoryShow::NetCatogoryShow(QWidget *parent) - ,m_rectTotalHeight(38) - ,m_rectTotalWidth(58) - ,m_outsideBorderColor(Qt::transparent) -+ ,qtSettings(nullptr) - { - - const QByteArray idd(THEME_QT_SCHEMA); -@@ -66,16 +67,17 @@ NetCatogoryShow::NetCatogoryShow(QWidget *parent) - - void NetCatogoryShow::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } -+ - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { - if (key == "styleName") - { --// auto style = qtSettings->get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); --// qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); - updateBgColor(); - repaint(); - } -diff --git a/src/networkflow.cpp b/src/networkflow.cpp -index ecac95b..c139395 100755 ---- a/src/networkflow.cpp -+++ b/src/networkflow.cpp -@@ -105,6 +105,7 @@ NetworkFlow::NetworkFlow(QWidget *parent) : QWidget(parent) - ,m_outsideBorderColor(QColor("transparent")) - ,m_downloadColor(QColor("#009944")) - ,m_uploadColor(QColor("#e60012")) -+ ,qtSettings(nullptr) - { - - const QByteArray idd(THEME_QT_SCHEMA); -@@ -146,20 +147,19 @@ NetworkFlow::NetworkFlow(QWidget *parent) : QWidget(parent) - - void NetworkFlow::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } - - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { - if (key == "styleName") - { --// auto style = qtSettings->get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); - } - repaint(); --// update(); - }); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); - } -diff --git a/src/networkindicator.cpp b/src/networkindicator.cpp -index eb4c4f6..af12711 100755 ---- a/src/networkindicator.cpp -+++ b/src/networkindicator.cpp -@@ -100,6 +100,7 @@ NetworkIndicator::NetworkIndicator(QWidget *parent) - ,m_rectTotalHeight(38) - ,m_rectTotalWidth(58) - ,m_outsideBorderColor(Qt::transparent) -+ ,qtSettings(nullptr) - { - const QByteArray idd(THEME_QT_SCHEMA); - -@@ -198,16 +199,17 @@ void NetworkIndicator::initWidgets() - - void NetworkIndicator::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } -+ - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { - if (key == "styleName") - { --// auto style = qtSettings->get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); - repaint(); - updateBgColor(); - } -diff --git a/src/processlistitem.cpp b/src/processlistitem.cpp -index b3b512e..d976771 100755 ---- a/src/processlistitem.cpp -+++ b/src/processlistitem.cpp -@@ -49,7 +49,7 @@ ProcessListItem::ProcessListItem(ProcData info) - iconSize = 20; - padding = 14; - textPadding = 10; -- //initThemeMode(); -+ initThemeMode(); - } - - ProcessListItem::~ProcessListItem() -@@ -66,6 +66,7 @@ ProcessListItem::~ProcessListItem() - void ProcessListItem::initThemeMode() - { - if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; - return; - } - //监听主题改变 -@@ -124,12 +125,12 @@ void ProcessListItem::drawBackground(QRect rect, QPainter *painter, int index, b - if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { - painter->fillPath(path, QColor("#ffffff")); -- } -- -- if(currentThemeMode == "ukui-dark" || currentThemeMode == "ukui-black") -+ } else if (currentThemeMode == "ukui-dark" || currentThemeMode == "ukui-black") - { - painter->fillPath(path,QColor("#131414")); -- } -+ } else { -+ painter->fillPath(path, QColor("000000")); -+ } - } - } - -diff --git a/src/processlistwidget.cpp b/src/processlistwidget.cpp -index c2001ae..1260c89 100755 ---- a/src/processlistwidget.cpp -+++ b/src/processlistwidget.cpp -@@ -51,6 +51,8 @@ ProcessListWidget::ProcessListWidget(QList toBeDisplayedColumns, QWidget * - ,m_titlePressColumn(-1) - ,m_mouseAtScrollArea(false) - ,m_mouseDragScrollbar(false) -+ ,fontSettings(nullptr) -+ ,qtSettings(nullptr) - { - - const QByteArray idd(THEME_QT_SCHEMA); -@@ -116,17 +118,17 @@ ProcessListWidget::ProcessListWidget(QList toBeDisplayedColumns, QWidget * - - void ProcessListWidget::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { - - if (key == "styleName") - { --// auto style = qtSettings->get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); - repaint(); - } - }); -@@ -135,6 +137,10 @@ void ProcessListWidget::initThemeMode() - - void ProcessListWidget::initFontSize() - { -+ if (!fontSettings) { -+ fontSize = DEFAULT_FONT_SIZE; -+ return; -+ } - connect(fontSettings,&QGSettings::changed,[=](QString key) - { - if("systemFont" == key || "systemFontSize" == key) -@@ -839,11 +845,9 @@ void ProcessListWidget::paintEvent(QPaintEvent *) - { - if(counter == 0 || counter == 5) - { -- qDebug()<<"m_currentSortIndex------"<m_isSort) - { -- qDebug()<<"m_isSort----------"<m_isSort) - { -- qDebug()<<"m_isSort----------"<setFixedSize(188, 56); - - initThemeMode(); -@@ -65,11 +63,9 @@ ResourcesIndicator::ResourcesIndicator(int flag, QWidget *parent) - } - - if (flag == 0) { --// m_borderColor = palette().color(QPalette::WindowText); //#0973b4 - m_borderColor = QColor(0x09,0x73,0xb4,0xff); - } - else if (flag == 1) { --// m_borderColor = palette().color(QPalette::WindowText); //QColor("#9528b4") - m_borderColor = QColor(0x95,0x28,0xb4,0xff); - } - else { -@@ -84,6 +80,10 @@ ResourcesIndicator::~ResourcesIndicator() - - void ResourcesIndicator::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { -@@ -292,16 +292,11 @@ void ResourcesIndicator::paintEvent(QPaintEvent *event) - // QPainterPath picPath; - // picPath.addRoundedRect(); - -- qDebug()<<"this->m_rectTotalWidth"<<"----"<<"convertPercent"<m_rectTotalWidth<<"----"<width()<<"My width my height"<height(); - - if(typeObject == 0) - { - painter.setOpacity(0.46); - painter.setBrush(QColor("#0973b4")); --// painter.setOpacity(0.46); --// pen.setColor(QColor("#0973b4")); //#fc7416 - } - - if(typeObject == 1) -diff --git a/src/src.pro b/src/src.pro -index d9efd90..83b876f 100755 ---- a/src/src.pro -+++ b/src/src.pro -@@ -18,13 +18,12 @@ DESTDIR = .. - - LIBS += -L/usr/lib/ -lX11 -lpcap -lm - --CONFIG += link_pkgconfig \ -- C++11 -+CONFIG += link_pkgconfig \ -+ c++11 -+ - #gio-2.0 - #LIBS +=-lgio-2.0 -lglib-2.0 - --CONFIG += c++11\ -- link_pkgconfig - PKGCONFIG += libgtop-2.0 \ - libsystemd \ - gsettings-qt \ -@@ -175,9 +174,6 @@ SOURCES += \ - OTHER_FILES += \ - systemmonitor.json - --#RESOURCES += \ --# img.qrc -- - RESOURCES += \ - res.qrc - -diff --git a/src/systemmonitor.cpp b/src/systemmonitor.cpp -index 5698e14..e9971d2 100755 ---- a/src/systemmonitor.cpp -+++ b/src/systemmonitor.cpp -@@ -109,6 +109,11 @@ SystemMonitor::SystemMonitor(QWidget *parent) - - void SystemMonitor::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } -+ - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { -diff --git a/widgets/mysearchedit.cpp b/widgets/mysearchedit.cpp -index 75d9fce..366eae1 100755 ---- a/widgets/mysearchedit.cpp -+++ b/widgets/mysearchedit.cpp -@@ -32,6 +32,7 @@ MySearchEdit::MySearchEdit(QWidget *parent) - ,m_showCurve(QEasingCurve::OutCubic) - ,m_hideCurve(QEasingCurve::InCubic) - ,fontSettings(nullptr) -+ ,qtSettings(nullptr) - { - const QByteArray idd(THEME_QT_SCHEMA); - -@@ -53,13 +54,6 @@ MySearchEdit::MySearchEdit(QWidget *parent) - m_searchBtn->setStyleSheet("QLabel{background-color:transparent;border:none;background-image:url(:/img/search.png);}"); - m_searchBtn->setFixedSize(SEARCHBUTTON, SEARCHBUTTON); - --// m_clearBtn = new MyTristateButton; --// QPushButton *m_clearBtn = new QPushButton(); --// QIcon icon(tr(":/img/close.png")); --// m_clearBtn->setIcon(icon); --// m_clearBtn->setObjectName("ClearIcon"); --// m_clearBtn->hide(); -- - m_pClearTextButton = new QPushButton; - m_pClearTextButton->setFixedSize(19, 21); - m_pClearTextButton->setIconSize(QSize(19, 19)); -@@ -68,15 +62,9 @@ MySearchEdit::MySearchEdit(QWidget *parent) - m_edit = new QLineEdit; - - QIcon ClearTextEditIcon; --// ClearTextEditIcon.addFile(":/img/button-close-default-add-background-three.svg"); --// m_pClearTextButton->setIcon(ClearTextEditIcon); -- //m_pClearTextButton->setIcon(drawSymbolicColoredPixmap(QPixmap::fromImage(QIcon::fromTheme(":/img/button-close-default-add-background-three.svg").pixmap(24,24).toImage()))); - m_pClearTextButton->setCursor(Qt::ArrowCursor); - -- -- - m_edit->setAttribute(Qt::WA_Hover, true); --// m_edit->setStyle(new InternalStyle("ukui-default")); - m_edit->setTextMargins(8,0,0,0); - - connect(m_edit, &QLineEdit::textChanged, this, &MySearchEdit::textChageSlots); -@@ -108,8 +96,6 @@ MySearchEdit::MySearchEdit(QWidget *parent) - - m_animation = new QPropertyAnimation(m_edit, "minimumWidth"); - --// m_size = QSize(m_searchBtn->sizeHint().width() + m_edit->sizeHint().width() + m_clearBtn->sizeHint().width() + 6, --// qMax(m_searchBtn->sizeHint().height(), m_edit->sizeHint().height())); - m_edit->setFixedWidth(0); - m_edit->installEventFilter(this); - -@@ -130,20 +116,12 @@ MySearchEdit::MySearchEdit(QWidget *parent) - layout->addWidget(m_pClearTextButton); - layout->setAlignment(m_pClearTextButton,Qt::AlignCenter); - layout->addStretch(); --// layout->addWidget(m_clearBtn); --// layout->setAlignment(m_clearBtn, Qt::AlignCenter); -- - layout->setSpacing(0); - layout->setContentsMargins(0, 0, 0, 0); - - setFocusPolicy(Qt::StrongFocus); - --// connect(m_edit, &QLineEdit::textChanged, [this] {m_clearBtn->setVisible(!m_edit->text().isEmpty());}); - connect(m_edit, &QLineEdit::textChanged, this, &MySearchEdit::textChanged, Qt::DirectConnection); --// connect(m_clearBtn, SIGNAL(clicked()), this, SLOT(clearAndFocusEdit())); --// connect(m_clearBtn, &MyTristateButton::clicked, this, [=] { --// this->clearAndFocusEdit(); --// }); - } - - -@@ -210,7 +188,6 @@ MySearchEdit::~MySearchEdit() - delete m_edit; - delete m_searchBtn; - delete m_placeHolder; --// delete m_clearBtn; - if(fontSettings) - { - delete fontSettings; -@@ -282,7 +259,6 @@ void MySearchEdit::setEditFocus() - m_animation->start(); - m_placeHolder->hide(); - m_edit->setFocus(); -- //this->setStyleSheet("QFrame{background-color:rgba(19,19,20,0.2);border:1px solid #CC00FF;border-radius:4px;}"); - } - - void MySearchEdit::setPlaceHolder(const QString &text) -@@ -332,50 +308,18 @@ void MySearchEdit::textChageSlots(const QString &text) - } - } - --//void MySearchEdit::paintEvent(QEvent *event) --//{ --//// QStyleOption opt; --//// opt.init(this); --//// QPainter p(this); --//// p.setBrush(QBrush(QColor(0x19,0x19,0x20,0xFF))); --//// p.setPen(Qt::NoPen); --//// QPainterPath path; --//// opt.rect.adjust(0,0,0,0); --//// path.addRoundedRect(opt.rect,6,6); --//// p.setRenderHint(QPainter::Antialiasing); // 反锯齿; --//// style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); --//// p.drawRoundedRect(opt.rect, 6, 6); --// QStyleOption opt; --// opt.init(this); --// QPainter p(this); --// p.setBrush(QBrush(QColor(0x19,0x19,0x20,0x19))); --// //p.setPen(Qt::NoPen); --// QPainterPath path; --// //opt.rect.adjust(0,0,0,0); --//// path.addRoundRect(opt.rect.topLeft(),6); -- --// path.addPath(path); --// path.addRoundedRect(opt.rect,6,6); --// p.setRenderHint(QPainter::Antialiasing); // 反锯齿; --//// p.drawRoundedRect(opt.rect,6,6); --// style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); --//// p.setPen(QPen(QColor("#e9eef0"), 0));//边框颜色 --//// p.setBrush(QColor("#0d87ca"));//背景色 --//// QRectF r(1, 1, width() - 2, height() - 2);//左边 上边 右边 下边 --// p.drawPath(path); --//} -- - void MySearchEdit::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } -+ - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key){ - - if (key == "styleName") { --// auto style = qtSettings->get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); --// qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); - m_pClearTextButton->setIcon(drawSymbolicColoredPixmap(QPixmap::fromImage(QIcon::fromTheme(":/img/button-close-default-add-background-three.svg").pixmap(24,24).toImage()))); - - if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") -@@ -398,8 +342,6 @@ void MySearchEdit::initThemeMode() - }); - //获取当前主题 - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); --// qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); - m_pClearTextButton->setIcon(drawSymbolicColoredPixmap(QPixmap::fromImage(QIcon::fromTheme(":/img/button-close-default-add-background-three.svg").pixmap(24,24).toImage()))); - if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { -diff --git a/widgets/myunderlinebutton.cpp b/widgets/myunderlinebutton.cpp -index 548b2cd..3da8549 100755 ---- a/widgets/myunderlinebutton.cpp -+++ b/widgets/myunderlinebutton.cpp -@@ -31,6 +31,7 @@ MyUnderLineButton::MyUnderLineButton(QWidget *parent) - ,m_state(Normal) - ,m_isChecked(false) - ,fontSettings(nullptr) -+ ,qtSettings(nullptr) - { - const QByteArray idd(THEME_QT_SCHEMA); - -@@ -50,27 +51,22 @@ MyUnderLineButton::MyUnderLineButton(QWidget *parent) - - this->setFixedSize(NORMALWIDTH, NORMALHEIGHT+2); - m_textLabel = new QLabel; --// QFont ftSize; --// ftSize.setPointSize(fontSize); --// m_textLabel->setFont(ftSize); - - initThemeMode(); - initFontSize(); - --// m_underlineLabel = new QLabel; --// m_underlineLabel->setFixedSize(52, 2); --// m_underlineLabel->setStyleSheet("QLabel{background-color:#ffffff;}"); --// m_underlineLabel->hide(); -- - m_layout = new QVBoxLayout(this); - m_layout->setContentsMargins(0,0,0,0); - - m_layout->addWidget(m_textLabel, 0, Qt::AlignVCenter| Qt::AlignCenter); -- //m_layout->addWidget(m_underlineLabel, 0, Qt::AlignBottom | Qt::AlignHCenter); - } - - void MyUnderLineButton::initThemeMode() - { -+ if (!qtSettings) { -+// qWarning() << "Failed to load the gsettings: " << THEME_QT_SCHEMA; -+ return; -+ } - - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) -@@ -78,12 +74,7 @@ void MyUnderLineButton::initThemeMode() - - if (key == "styleName") - { --// auto style = qtSettings->get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); -- //repaint(); - if (currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { - m_textLabel->setStyleSheet("QLabel{background-color:transparent;color:rgba(0,0,0,0.57);text-align:center;}"); //ffffff -@@ -95,8 +86,6 @@ void MyUnderLineButton::initThemeMode() - m_textLabel->setStyleSheet("QLabel{background-color:transparent;color:rgba(255,255,255,0.57); text-align:center;}"); //ffffff - } - } --// repaint(); --// updateStyleSheet(); - }); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); - if (currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") -@@ -227,11 +216,11 @@ void MyUnderLineButton::updateStyleSheet() - case Normal: - if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { -- m_textLabel->setStyleSheet("QLabel{back-color:transparent;color:rgba(0,0,0,0.57); text-align:center;}"); -+ m_textLabel->setStyleSheet("QLabel{background-color:transparent;color:rgba(0,0,0,0.57); text-align:center;}"); - } - else - { -- m_textLabel->setStyleSheet("QLabel{back-color:transparent;color:rgba(255,255,255,0.57); text-align:center;}"); -+ m_textLabel->setStyleSheet("QLabel{background-color:transparent;color:rgba(255,255,255,0.57); text-align:center;}"); - } - // case Normal: - -@@ -244,7 +233,7 @@ void MyUnderLineButton::updateStyleSheet() - // //m_underlineLabel->hide(); - // break; - } --// ////////////// m_textLabel->setStyleSheet("QLabel{color:white};"); -+// m_textLabel->setStyleSheet("QLabel{color:white};"); - } - - void MyUnderLineButton::setState(MyUnderLineButton::ButtonState state) --- -2.30.0 - diff --git a/0008-Update-changelog.patch b/0008-Update-changelog.patch deleted file mode 100644 index d4f07f31bfec5597f1b077782acbb29358ed6ab0..0000000000000000000000000000000000000000 --- a/0008-Update-changelog.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ec6c908b1cfb96295f5308c6fff3256da8a6316b Mon Sep 17 00:00:00 2001 -From: pei-jiankang -Date: Wed, 22 Dec 2021 11:56:32 +0800 -Subject: [PATCH] Update changelog - ---- - debian/changelog | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/debian/changelog b/debian/changelog -index ea4cfe7..2aaf046 100755 ---- a/debian/changelog -+++ b/debian/changelog -@@ -1,3 +1,9 @@ -+ukui-system-monitor (1.0.3-1) unstable; urgency=medium -+ -+ * New upstream release: fix the segmentation fault. -+ -+ -- handsome_feng Fri, 27 Nov 2020 11:53:38 -+ - ukui-system-monitor (1.0.2-1) unstable; urgency=medium - - * New upstream release. --- -2.30.0 - diff --git a/0009-desktop-add-Tibetan-name-and-introduction.patch b/0009-desktop-add-Tibetan-name-and-introduction.patch deleted file mode 100644 index 4535d382c583ae55cd3117eed4db45235b5ec300..0000000000000000000000000000000000000000 --- a/0009-desktop-add-Tibetan-name-and-introduction.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 9cf24b899f2e67245c855fae705db6051f4da5a8 Mon Sep 17 00:00:00 2001 -From: tanyulong2021 -Date: Wed, 29 Jun 2022 14:42:16 +0800 -Subject: [PATCH] desktop add Tibetan name and introduction - ---- - ukui-system-monitor.desktop | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/ukui-system-monitor.desktop b/ukui-system-monitor.desktop -index 409c54f..8b2a6ef 100755 ---- a/ukui-system-monitor.desktop -+++ b/ukui-system-monitor.desktop -@@ -2,11 +2,14 @@ - Name=Kylin System Monitor - Name[zh_CN]=系统监视器 - Name[tr_TR]=Kylin Sistem İzleyici -+Name[bo_CN]=རྒྱུད་ཁོངས་སོ་ལྟ་ཆས། - GenericName=Kylin System Monitor - GenericName[zh_CN]=系统监视器 -+GenericName[bo_CN]=རྒྱུད་ཁོངས་སོ་ལྟ་ཆས། - Comment=Kylin System Monitor - Comment[zh_CN]=系统监视器 - Comment[tr_TR]=Kylin Sistem İzleyici -+Comment[bo_CN]=རྒྱུད་ཁོངས་སོ་ལྟ་ཆས། - Keywords=guide; - Exec=/usr/bin/ukui-system-monitor - Icon=ukui-system-monitor --- -2.33.0 - diff --git a/0010-add-Support-Tibetan-translation.patch b/0010-add-Support-Tibetan-translation.patch deleted file mode 100644 index b1e3cbcb26efe4b304445d3671de9b3092ca7e84..0000000000000000000000000000000000000000 --- a/0010-add-Support-Tibetan-translation.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 5f3829a86969a79769dcf44c1918789d93c9b684 Mon Sep 17 00:00:00 2001 -From: tanyulong2021 -Date: Wed, 29 Jun 2022 16:27:49 +0800 -Subject: [PATCH] add Support Tibetan translation - ---- - debian/ukui-system-monitor.install | 3 +++ - src/main.cpp | 7 ++++++- - 2 files changed, 9 insertions(+), 1 deletion(-) - create mode 100644 debian/ukui-system-monitor.install - -diff --git a/debian/ukui-system-monitor.install b/debian/ukui-system-monitor.install -new file mode 100644 -index 0000000..788e6fa ---- /dev/null -+++ b/debian/ukui-system-monitor.install -@@ -0,0 +1,3 @@ -+data/kylin-system-monitor /usr/share/kylin-user-guide/data/guide -+data/png /usr/share/icons/hicolor/ -+src/translation/*.qm /usr/share/ukui-system-monitor/translations/ -diff --git a/src/main.cpp b/src/main.cpp -index f65b25a..b9b2613 100755 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -69,9 +69,14 @@ int main(int argc, char *argv[]) - - QString locale = QLocale::system().name(); - QTranslator translator; -- if(locale == "zh_CN" || locale == "es" || locale == "fr" || locale == "de" || locale == "ru") {//中文 西班牙语 法语 德语 俄语 -+ if(locale == "zh_CN" || locale == "es" || locale == "fr" || locale == "de" || locale == "ru" || locale == "en_US" || locale == "bo_CN") {//中文 西班牙语 法语 德语 俄语 -+ #if 0 - if(!translator.load("ukui-system-monitor_" + locale + ".qm", - ":/translation/")) -+ #else -+ if(!translator.load("ukui-system-monitor_" + locale + ".qm", -+ "/usr/share/ukui-system-monitor/translations/")) -+ #endif - qDebug() << "Load translation file:"<< "ukui-system-monitor_" + locale + ".qm" << " failed!"; - else - app.installTranslator(&translator); --- -2.33.0 - diff --git a/0011-Adapt-QT5.15-to-add-a-fractional-scaling-property.patch b/0011-Adapt-QT5.15-to-add-a-fractional-scaling-property.patch deleted file mode 100644 index 7d7fcb8f206a613aaa94135ad44dae2bb6033057..0000000000000000000000000000000000000000 --- a/0011-Adapt-QT5.15-to-add-a-fractional-scaling-property.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 66750d5275ea354c5bc302e179dd50be23477594 Mon Sep 17 00:00:00 2001 -From: tanyulong2021 -Date: Fri, 29 Jul 2022 10:21:36 +0800 -Subject: [PATCH] Adapt QT5.15 to add a fractional scaling property - ---- - src/main.cpp | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/main.cpp b/src/main.cpp -index b9b2613..c6cdcf2 100755 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -51,8 +51,13 @@ int main(int argc, char *argv[]) - // XCloseDisplay(disp); - // } - -- QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -- QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); -+ #if (QT_VERSION >= QT_VERSION_CHECK(5 , 12 , 0)) -+ QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -+ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); -+ #endif -+ #if (QT_VERSION >= QT_VERSION_CHECK(5 , 14 , 0)) -+ QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); -+ #endif - - QString id = QString("ukui-system-monitor"+QLatin1String(getenv("DISPLAY"))); - QtSingleApplication app(id,argc,argv); --- -2.33.0 - diff --git a/0012-Modify-the-Chinese-translation-of-the-Nice-field.patch b/0012-Modify-the-Chinese-translation-of-the-Nice-field.patch deleted file mode 100644 index d8f220d1a0bb146c471b11ceea61ac9eef5e955b..0000000000000000000000000000000000000000 --- a/0012-Modify-the-Chinese-translation-of-the-Nice-field.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 4de2cbc5ac3467ed119efd83cbc1ae04a3e025c4 Mon Sep 17 00:00:00 2001 -From: tanyulong2021 -Date: Fri, 29 Jul 2022 11:23:55 +0800 -Subject: [PATCH] Modify the Chinese translation of the Nice field - ---- - src/translation/ukui-system-monitor_zh_CN.ts | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/translation/ukui-system-monitor_zh_CN.ts b/src/translation/ukui-system-monitor_zh_CN.ts -index f158a93..30d79fc 100755 ---- a/src/translation/ukui-system-monitor_zh_CN.ts -+++ b/src/translation/ukui-system-monitor_zh_CN.ts -@@ -2392,7 +2392,7 @@ Are you sure to continue? - - - Nice value: -- Nice 值: -+ 优先值: - - - -@@ -2402,7 +2402,7 @@ Are you sure to continue? - - - The priority of a process is given by its nice value. A lower nice value corresponds to a higher priority. -- 进程的优先级由它的 nice 值指定。较低的 nice 值对应较高的优先级。 -+ 进程的优先级由它的优先值指定。较低的优先值对应较高的优先级。 - - - --- -2.33.0 - diff --git a/fix-the-bug-about-process-filesystem.patch b/fix-the-bug-about-process-filesystem.patch deleted file mode 100644 index df17b9b56d8e68ed7d5ab6d111f80654e16fdc4f..0000000000000000000000000000000000000000 --- a/fix-the-bug-about-process-filesystem.patch +++ /dev/null @@ -1,2538 +0,0 @@ -diff -Naur ukui-system-monitor-1.0.1/debian/changelog ukui-system-monitor-1.0.1~/debian/changelog ---- ukui-system-monitor-1.0.1/debian/changelog 2021-12-08 22:01:33.505280350 +0800 -+++ ukui-system-monitor-1.0.1~/debian/changelog 2021-12-08 22:53:56.646804171 +0800 -@@ -1,29 +1,16 @@ --ukui-system-monitor (2.0.2-10) v101; urgency=medium -- -- * 优化功能:1、进程列表信息增加锁保护;2、进程列表的icon对象放到ui线程中处理 -- * 修复bug:修复关于界面邮箱链接不可点击问题 -- -- -- Yang Min Sat, 06 Mar 2021 16:48:06 +0800 -- --ukui-system-monitor (2.0.2-9) v101; urgency=medium -- -- * 优化功能:优化进程列表显示 -- * 修复bug:1、修复搜索输入框偶现不显示内容问题;2、修复触摸屏无法触摸点击问题 -- -- -- Yang Min Tue, 02 Mar 2021 16:57:00 +0800 - ukui-system-monitor (1.0.2-1) unstable; urgency=medium - - * New upstream release. - * d/control: Remove useless depends to allow migration. - -- -- handsome_feng Thu, 26 Nov 2020 10:12:45 -- -+ -- handsome_feng Thu, 26 Nov 2020 10:12:45 +0800 - --ukui-system-monitor (1.0.0-1+1027) focal; urgency=medium -+ukui-system-monitor (1.0.0-2) unstable; urgency=medium - -- * Daily build. -+ * Team upload. -+ * No change rebuild to allow migration - -- -- liuliang Mon, 27 May 2019 15:48:18 +0800 -+ -- Aron Xu Tue, 29 Sep 2020 14:42:29 +0800 - - ukui-system-monitor (1.0.0-1) unstable; urgency=medium - -diff -Naur ukui-system-monitor-1.0.1/README.md ukui-system-monitor-1.0.1~/README.md ---- ukui-system-monitor-1.0.1/README.md 2021-12-08 22:01:33.502030300 +0800 -+++ ukui-system-monitor-1.0.1~/README.md 2021-12-08 22:53:56.624053825 +0800 -@@ -4,8 +4,8 @@ - (such as CPU and memory) and File Systems on your system. - - ## Build --mkdir build --qmake .. -+./autogen.sh -+make - sudo make install - - ## Bug report -diff -Naur ukui-system-monitor-1.0.1/shell/macro.h ukui-system-monitor-1.0.1~/shell/macro.h ---- ukui-system-monitor-1.0.1/shell/macro.h 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/shell/macro.h 2021-12-08 22:53:56.672804568 +0800 -@@ -46,6 +46,7 @@ - #define MAINWINDOWHEIGHT 590 - #define MAINWINDOWWIDTH 760 - #define SEARCHBUTTON 16 -+#define DEFAULT_FONT_SIZE 14 - - #define SERVICE_NAME_SIZE 64 - #define UKUI_SYSTEM_MONITOR_PATH "/" -diff -Naur ukui-system-monitor-1.0.1/src/cpuballwidget.cpp ukui-system-monitor-1.0.1~/src/cpuballwidget.cpp ---- ukui-system-monitor-1.0.1/src/cpuballwidget.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/cpuballwidget.cpp 2021-12-08 22:53:56.843973846 +0800 -@@ -54,11 +54,9 @@ - m_prevPercentValue = 0.0; - m_percentValue = 0.0; - m_progressText = QString("%1%").arg(QString::number(m_percentValue, 'f', 1)); //把小数转化为字符串,1是小数点后几位,此为小数点后1位 -- qDebug()<<"m_progressText----------------"<setOffset(0, 0); --// m_shadowEffect->setColor(QColor(232, 232, 232, 127)); - m_shadowEffect->setColor(QColor("transparent")); - m_shadowEffect->setBlurRadius(10); - this->setGraphicsEffect(m_shadowEffect); -diff -Naur ukui-system-monitor-1.0.1/src/cpuratewidget.cpp ukui-system-monitor-1.0.1~/src/cpuratewidget.cpp ---- ukui-system-monitor-1.0.1/src/cpuratewidget.cpp 2021-12-08 22:01:33.494446850 +0800 -+++ ukui-system-monitor-1.0.1~/src/cpuratewidget.cpp 2021-12-08 22:53:56.923058385 +0800 -@@ -75,12 +75,13 @@ - while (!file.atEnd()) { - if (content.contains("processor")) - cpuCounts ++; -- qDebug()<<"cpuCounts"<width()<<"qqqqqqqqqqqqqqqqqqqqq"<height(); - // w->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - m_labelLayout = new QVBoxLayout(w); - m_labelLayout->setContentsMargins(0, 0, 0, 0); -@@ -342,13 +338,11 @@ - m_title->setStyleSheet("background:transparent;font-size:24px;color:palette(windowText)"); //#000000 - - m_cpuRateTitle = new QLabel; --// m_cpuRateTitle->setStyleSheet("QLabel{background:transparent;font-size:12px;color:palette(windowText);}"); //#999999 - m_cpuRateTitle->setText(tr("Occupancy rate")); - m_cpuRateText = new QLabel; - m_cpuRateText->setStyleSheet("QLabel{background:transparent;font-size:20px;color:palette(windowTexg);}"); //#000000 - - m_cpuIdleRateTitle = new QLabel; --// m_cpuIdleRateTitle->setStyleSheet("QLabel{background:transparent;font-size:12px;color:palette(windowTexg);}"); - m_cpuIdleRateTitle->setText(tr("Idle rate")); - m_cpuIdleRateText = new QLabel; - m_cpuIdleRateText->setStyleSheet("QLabel{background:transparent;font-size:20px;color:palette(windowTexg);}"); -@@ -357,13 +351,11 @@ - m_cpuIdleRateTitle->hide(); - - m_cpuRunTimeTitle = new QLabel; --// m_cpuRunTimeTitle->setStyleSheet("QLabel{background:transparent;font-size:12px;color:palette(windowTexg);}"); - m_cpuRunTimeTitle->setText(tr("The running time of system")); - m_cpuRunTimeText = new QLabel; - m_cpuRunTimeText->setStyleSheet("QLabel{background:transparent;font-size:20px;color:palette(windowTexg);}"); - - m_cpuIdleTimeTitle = new QLabel; --// m_cpuIdleTimeTitle->setStyleSheet("QLabel{background:transparent;font-size:12px;color:palette(windowTexg);}"); - m_cpuIdleTimeTitle->setText(tr("The idle time of system")); - m_cpuIdleTimeText = new QLabel; - m_cpuIdleTimeText->setStyleSheet("QLabel{background:transparent;font-size:20px;color:palette(windowTexg);}"); -@@ -393,8 +385,6 @@ - cpuIdleTimeLayout->addWidget(m_cpuIdleTimeTitle); - cpuIdleTimeLayout->addWidget(m_cpuIdleTimeText); - -- -- - m_labelLayout->setContentsMargins(0, 0, 0, 0); - m_labelLayout->setSpacing(50); - m_labelLayout->addWidget(m_title); -@@ -415,11 +405,8 @@ - unsigned long idletime; - QString rate = getIdelRate(runtime, idletime); - m_cpuIdleRateText->setText(rate); --// qDebug()<<"rate-----------"<setText(convertTimeToString(runtime)); --// qDebug()<<"runtime----------"<setText(convertTimeToString(idletime)); --// qDebug()<<"idletime---------"< - - FileSystemListItem::FileSystemListItem(FileSystemData *info) -+ :fontSettings(nullptr) - { - m_data = info; - iconSize = 20; -@@ -46,7 +47,6 @@ - - if(QGSettings::isSchemaInstalled(id)) - { -- qDebug()<<"installl fontSettings----->"<get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); -- //repaint(); -+ qDebug() <<" Current theme mode change to: "<get(MODE_QT_KEY).toString(); -@@ -87,24 +86,19 @@ - - void FileSystemListItem::initFontSize() - { -- connect(fontSettings,&QGSettings::changed,this,[=](QString key) -+ if (!fontSettings) { -+ fontSize = DEFAULT_FONT_SIZE; -+ return; -+ } -+ -+ connect(fontSettings, &QGSettings::changed, this, [=](QString key) - { - if("systemFont" == key || "systemFontSize" == key) - { -- qDebug()<<"i have come in 111"; -- -- fontSize = fontSettings->get(FONT_SIZE).toInt(); --// repaint(); --// for(auto widget:qApp->allWidgets()) --// { --// widget->repaint(); --// widget->setFont(fSize); --// } -- qDebug()<get(FONT_SIZE).toString().toFloat(); - } -- qDebug()<<"i have come in 222"; - }); -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - } - - bool FileSystemListItem::isSameItem(FileSystemListItem *item) -@@ -151,7 +145,7 @@ - QFont font = painter->font(); - QFontMetrics fm(font); - QString deviceName = fm.elidedText(m_data->deviceName(), Qt::ElideRight, nameMaxWidth);//Qt::ElideMiddle -- painter->drawText(QRect(rect.x() + iconSize + padding * 2, rect.y(), nameMaxWidth, rect.height()), Qt::AlignLeft | Qt::AlignVCenter, deviceName); -+ painter->drawText(QRect(rect.x() + iconSize + padding * 2, rect.y(), nameMaxWidth, rect.height()), Qt::AlignCenter, deviceName); - if (!isSeparator) { - painter->setOpacity(0.8); - QPainterPath separatorPath; -@@ -165,7 +159,7 @@ - QFont font = painter->font(); - QFontMetrics fm(font); - QString mountDir = fm.elidedText(m_data->mountDir(), Qt::ElideMiddle, maxWidth); -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignLeft | Qt::AlignVCenter, mountDir); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, mountDir); - } - if (!isSeparator) { - painter->setOpacity(0.8); -@@ -180,7 +174,7 @@ - QFont font = painter->font(); - QFontMetrics fm(font); - QString diskType = fm.elidedText(m_data->diskType(), Qt::ElideRight, maxWidth); -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignRight | Qt::AlignVCenter, diskType); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, diskType); - } - if (!isSeparator) { - painter->setOpacity(0.8); -@@ -195,7 +189,7 @@ - QFont font = painter->font(); - QFontMetrics fm(font); - QString tCapacity = fm.elidedText(m_data->totalCapacity(), Qt::ElideRight, maxWidth); -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignRight | Qt::AlignVCenter, tCapacity); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, tCapacity); - } - if (!isSeparator) { - painter->setOpacity(0.8); -@@ -210,7 +204,7 @@ - QFont font = painter->font(); - QFontMetrics fm(font); - QString fCapacity = fm.elidedText(m_data->freeCapacity(), Qt::ElideRight, maxWidth); -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignRight | Qt::AlignVCenter, fCapacity); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, fCapacity); - } - if (!isSeparator) { - painter->setOpacity(0.8); -@@ -225,7 +219,7 @@ - QFont font = painter->font(); - QFontMetrics fm(font); - QString aCapacity = fm.elidedText(m_data->availCapacity(), Qt::ElideRight, maxWidth); -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignRight | Qt::AlignVCenter, aCapacity); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, aCapacity); - } - if (!isSeparator) { - painter->setOpacity(0.8); -@@ -235,6 +229,7 @@ - } - } - else if (column == 6) { -+ int maxWidth = rect.width(); - int leftPadding = 10; - int topPadding = 5; - int progressWidth = 100; -@@ -243,22 +238,27 @@ - if (!m_data->usedCapactiy().isEmpty()) { - QFont font = painter->font(); - QFontMetrics fm(font); -- QString uCapacity = fm.elidedText(m_data->usedCapactiy(), Qt::ElideRight, textMaxWidth - textPadding); -- painter->drawText(QRect(rect.x() + textPadding, rect.y(), textMaxWidth - textPadding, rect.height()), Qt::AlignLeft | Qt::AlignVCenter, uCapacity); -- } -- QPainterPath bgPath; -- bgPath.addRect(QRectF(rect.x() + textMaxWidth + leftPadding, rect.y() + topPadding, progressWidth, progressHeight)); -- painter->fillPath(bgPath, QColor("#C4BDBD")); --// painter->fillPath(bgPath,QColor("palette(Base)")); -+ QString uCapacity = fm.elidedText(m_data->usedCapactiy(), Qt::ElideRight, maxWidth); -+// painter->drawText(QRect(rect.x() + textPadding, rect.y(), textMaxWidth - textPadding, rect.height()), Qt::AlignCenter, uCapacity); -+ painter->drawText(QRect(rect.x() , rect.y(), rect.width(), rect.height()), Qt::AlignCenter, uCapacity); -+ } -+//这部分代码为原来绘制未占用区域的灰色部分。////////////// -+// QPainterPath bgPath; -+//// bgPath.addRect(QRectF(rect.x() + textMaxWidth + leftPadding, rect.y() + topPadding, progressWidth, progressHeight)); -+// bgPath.addRect(QRectF(rect.x() + textMaxWidth + leftPadding, rect.y() + topPadding, progressWidth, 2)); -+// painter->fillPath(bgPath, QColor("#C4BDBD")); -+//// painter->fillPath(bgPath,QColor("palette(Base)")); -+///////////////////////////////////////////////// - QPainterPath fillPath; -- fillPath.addRect(QRectF(rect.x() + textMaxWidth + leftPadding, rect.y() + topPadding, m_data->usedPercentage(), progressHeight)); -+// fillPath.addRect(QRectF(rect.x() + textMaxWidth + leftPadding, rect.y() + topPadding, m_data->usedPercentage(), progressHeight)); -+ fillPath.addRect(QRectF(rect.x() + rect.width() - m_data->usedPercentage(), rect.y() + rect.height() -2, m_data->usedPercentage(), 2)); - painter->setOpacity(0.5); - if (m_data->usedPercentage() < 75) - painter->fillPath(fillPath, QColor("#0288d1")); - else - painter->fillPath(fillPath, QColor("#f8b551")); -- painter->setOpacity(1); -- painter->drawText(QRect(rect.x() + textMaxWidth + leftPadding, rect.y() + topPadding, progressWidth, progressHeight), Qt::AlignHCenter | Qt::AlignVCenter, QString::number(m_data->usedPercentage()).append("%")); -+// painter->setOpacity(1); -+// painter->drawText(QRect(rect.x() + textMaxWidth + leftPadding, rect.y() + topPadding, progressWidth, progressHeight), Qt::AlignCenter, nullptr); - - /* - QStyleOptionProgressBar progressBarStyle;//progressBarStyle.initFrom(this); -diff -Naur ukui-system-monitor-1.0.1/src/filesystemlistwidget.cpp ukui-system-monitor-1.0.1~/src/filesystemlistwidget.cpp ---- ukui-system-monitor-1.0.1/src/filesystemlistwidget.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/filesystemlistwidget.cpp 2021-12-08 22:53:56.895974639 +0800 -@@ -43,6 +43,7 @@ - ,m_titlePressColumn(-1) - ,m_mouseAtScrollArea(false) - ,m_mouseDragScrollbar(false) -+ ,fontSettings(nullptr) - { - const QByteArray idd(THEME_QT_SCHEMA); - -@@ -66,7 +67,7 @@ - - this->columnTitles << tr("Device") << tr("Directory") << tr("Type") << tr("Total") << tr("Free") << tr("Available") << tr("Used"); - QList widths; -- widths << 150 << -1 << 80 << 80 << 80 << 80 << 180;//-1时让该行填充所有剩余空间 -+ widths << 150 << -1 << 80 << 80 << 80 << 80 << 120;//-1时让该行填充所有剩余空间 - - QFont font; - font.setPixelSize(12);//需要和填充所有剩余空间的那个的文字字体大小一致 font.setPointSize(9) -@@ -142,14 +143,18 @@ - - void FileSystemListWidget::initFontSize() - { -+ if (!fontSettings) { -+ fontSize = DEFAULT_FONT_SIZE; -+ return; -+ } - connect(fontSettings,&QGSettings::changed,[=](QString key) - { - if("systemFont" == key || "systemFontSize" == key) - { -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - } - }); -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - } - - void FileSystemListWidget::addSelectedItems(QList items, bool recordLastItem) -diff -Naur ukui-system-monitor-1.0.1/src/filesystemlistwidget.h ukui-system-monitor-1.0.1~/src/filesystemlistwidget.h ---- ukui-system-monitor-1.0.1/src/filesystemlistwidget.h 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/filesystemlistwidget.h 2021-12-08 22:53:56.934975234 +0800 -@@ -99,7 +99,7 @@ - int m_titlePadding; - int m_titlePressColumn; - -- int fontSize; -+ float fontSize; - - QGSettings * qtSettings; - QGSettings *fontSettings; -diff -Naur ukui-system-monitor-1.0.1/src/filesystemworker.cpp ukui-system-monitor-1.0.1~/src/filesystemworker.cpp ---- ukui-system-monitor-1.0.1/src/filesystemworker.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/filesystemworker.cpp 2021-12-08 22:53:56.866724192 +0800 -@@ -75,18 +75,13 @@ - guint64 bused, bfree, bavail, btotal; - gint percentage; - glibtop_get_fsusage(&usage, entry->mountdir); -- qDebug()<mountdir<<"1111111111111111111mountdir"; -- qDebug()<<"usage.blocks----"<devname,"none")==0 || strcmp(entry->devname,"tmpfs")==0){ -- qDebug()<<"333333"; - return disk; - } - if(strstr(entry->type, "tmpfs")) { -- qDebug()<<"444444"; - return disk; - } - fsusage_stats(&usage, &bused, &bfree, &bavail, &btotal, &percentage); -@@ -147,18 +142,15 @@ - guint i; - gboolean show_all_fs = TRUE; - entries = glibtop_get_mountlist(&mountlist, show_all_fs); -- qDebug()<<"number---"<isDeviceContains(dev_name)) { -- qDebug()<<"if iiiiiiiiii"; - FileSystemData *info = new FileSystemData(this); - info->setDevName(dev_name); - -@@ -180,9 +172,7 @@ - g_free(freeSize); - g_free(availSize); - g_free(usedSize); -- } -- else {//update info which had exists -- qDebug()<<"elseelseelseelse"; -+ } else {//update info which had exists - FileSystemData *info = this->getDiskInfo(dev_name); - if (info) { - char *totalSize = g_format_size_full(disk.btotal, G_FORMAT_SIZE_DEFAULT); -diff -Naur ukui-system-monitor-1.0.1/src/linebandwith.cpp ukui-system-monitor-1.0.1~/src/linebandwith.cpp ---- ukui-system-monitor-1.0.1/src/linebandwith.cpp 2021-12-08 22:01:33.495530200 +0800 -+++ ukui-system-monitor-1.0.1~/src/linebandwith.cpp 2021-12-08 22:53:57.005392975 +0800 -@@ -36,14 +36,10 @@ - - QString lineBandwith::new_count(qint64 count ,int pid) - { --// quint64 bandwith = count-count_prev; - qint64 bandwith = count - countMap[pid]; -- qDebug()<<"count---yayaya" < - #include - #include -+#include - - #include "framelessExtended/framelesshandle.h" - #include "systemmonitor.h" -@@ -33,23 +34,25 @@ - - int main(int argc, char *argv[]) - { -- Display *disp = XOpenDisplay(NULL); -- Screen *scrn = DefaultScreenOfDisplay(disp); -- if (NULL == scrn) { -- return 0; -- } -- int width = scrn->width; -- -- if (width > 2560) { -- #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) -- QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -- QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); -- #endif -- } -- if (NULL != disp) { -- XCloseDisplay(disp); -- } -+// Display *disp = XOpenDisplay(NULL); -+// Screen *scrn = DefaultScreenOfDisplay(disp); -+// if (NULL == scrn) { -+// return 0; -+// } -+// int width = scrn->width; -+ -+// if (width > 2560) { -+// #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) -+// QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -+// QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); -+// #endif -+// } -+// if (NULL != disp) { -+// XCloseDisplay(disp); -+// } - -+ QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -+ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); - - QString id = QString("ukui-system-monitor"+QLatin1String(getenv("DISPLAY"))); - QtSingleApplication app(id,argc,argv); -@@ -77,6 +80,7 @@ - SystemMonitor *monitor=new SystemMonitor(); - // monitor->setAttribute(Qt::WA_TranslucentBackground); - // monitor->setProperty("useSystemStyleBlur",true); -+ KWindowEffects::enableBlurBehind(monitor->winId(),true); - - monitor->setAttribute(Qt::WA_DeleteOnClose); - -diff -Naur ukui-system-monitor-1.0.1/src/memorywidget.cpp ukui-system-monitor-1.0.1~/src/memorywidget.cpp ---- ukui-system-monitor-1.0.1/src/memorywidget.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/memorywidget.cpp 2021-12-08 22:53:56.955558881 +0800 -@@ -31,7 +31,6 @@ - mainLayout->setContentsMargins(0, 0, 0, 0); - - QWidget *w = new QWidget; -- qDebug()<<"wodew"<width()<height(); - m_widgetLayout = new QVBoxLayout(w); - m_widgetLayout->setContentsMargins(0, 0, 0, 0); - m_widgetLayout->setSpacing(0); -diff -Naur ukui-system-monitor-1.0.1/src/monitortitlewidget.cpp ukui-system-monitor-1.0.1~/src/monitortitlewidget.cpp ---- ukui-system-monitor-1.0.1/src/monitortitlewidget.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/monitortitlewidget.cpp 2021-12-08 22:53:56.964225680 +0800 -@@ -42,6 +42,7 @@ - MonitorTitleWidget::MonitorTitleWidget(QSettings *settings, QWidget *parent) - :QFrame(parent) - ,proSettings(settings) -+ ,fontSettings(nullptr) - { - whichBox = new QList(); - const QByteArray idd(THEME_QT_SCHEMA); -@@ -72,13 +73,6 @@ - m_changeBox->addItem(tr("My Processes")); - m_changeBox->addItem(tr("All Process")); - m_changeBox->setFocusPolicy(Qt::NoFocus); -- qDebug()<itemText(0)<<"m_changeBox->itemText"; -- //m_changeBox->setCurrentIndex(0); --// QStandardItemModel *pItemModel = qobject_cast(m_changeBox->model()); --// pItemModel->item(0)->setForeground(QColor(255, 0, 0)); -- //m_changeBox->setFont(); -- -- - m_changeBox->setView(new QListView()); - - QFont changeBoxFont; -@@ -118,18 +112,8 @@ - m_searchTimer->setSingleShot(true); - connect(m_searchTimer, SIGNAL(timeout()), this, SLOT(onRefreshSearchResult())); - --// this->setStyleSheet("QWidget{" --// "background:rgba(19,19,20,1);" --// "border-top-left-radius:6px;" --// "border-top-right-radius:6px;" --// "}"); -- -- -- -- - initWidgets(); - this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); -- - } - - void MonitorTitleWidget::initThemeMode() -@@ -137,25 +121,15 @@ - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { -- - if (key == "styleName") - { -- qDebug()<<"yes this is in"; --// auto style = qtSettings->get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); -- //repaint(); - if (currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { -- qDebug()<<"the theme is white"; -+ qDebug() << "The theme change to white"; - m_changeBox->setStyleSheet("QComboBox{background:rgba(13,14,14,0.08);border-radius:6px;color:rgba(0,0,0,0.57)}" - "QComboBox::drop-down{border:0px;width:30px;}" - "QComboBox::down-arrow{image:url(:/img/down_arrow.png);}" -- "QComboBox QAbstractItemView {margin:0px 0px 0px 0px;padding: 0px 0px;border-radius:0px;background-color:palette(windowText);outline:0px;}" -- "QComboBox QAbstractItemView::item{border-radius:0px;color:rgba(0,0,0,0.57);height: 32px;background-color:palette(base);outline:0px;}" -- "QComboBox QAbstractItemView::item:hover{border-radius:0px;color(palette(windowText));background-color:#3D6BE5;outline:0px;}" - ); - this->setObjectName("MonitorTitle"); - this->setStyleSheet("QFrame#MonitorTitle{background:rgba(255,255,255,0);border-top-left-radius:6px;border-top-right-radius:6px;color: palette(windowText);}"); -@@ -164,31 +138,24 @@ - - if (currentThemeMode == "ukui-dark" || currentThemeMode == "ukui-black") - { -- qDebug()<<"the theme is black"; -+ qDebug() << "The theme change to black"; - m_changeBox->setStyleSheet("QComboBox{background:rgba(255,255,255,0.08);border-radius:6px;color:rgba(255,255,255,0.57)}" - "QComboBox::drop-down{border:0px;width:30px;}" - "QComboBox::down-arrow{image:url(:/img/down_arrow.png);}" -- "QComboBox QAbstractItemView {margin:0px 0px 0px 0px;padding: 0px 0px;border-radius:0px;background-color:palette(windowText);outline:0px;}" -- "QComboBox QAbstractItemView::item{border-radius:0px;font-size:13px;color:rgba(255,255,255,0.57);height: 32px;background-color:palette(base);outline:0px;}" -- "QComboBox QAbstractItemView::item:hover{border-radius:0px;font-size:13px;color(palette(windowText));background-color:#3D6BE5;outline:0px;}" - ); - this->setObjectName("MonitorTitle"); - this->setStyleSheet("QFrame#MonitorTitle{background:rgba(13,14,14,0);border-top-left-radius:6px;border-top-right-radius:6px;color: palette(windowText);}"); -- qDebug()<<"if monitorTiltWidgetEffect"; - } - - } - }); -- qDebug()<<"come in Monitor opacity"; -+ - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); - if (currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { - m_changeBox->setStyleSheet("QComboBox{background:rgba(13,14,14,0.08);border-radius:6px;color:rgba(0,0,0,0.57)}" - "QComboBox::drop-down{border:0px;width:30px;}" - "QComboBox::down-arrow{image:url(:/img/down_arrow.png);}" -- "QComboBox QAbstractItemView {margin:0px 0px 0px 0px;padding: 0px 0px;border-radius:0px;background-color:palette(windowText);outline:0px;}" -- "QComboBox QAbstractItemView::item{border-radius:0px;font-size:13px;color:rgba(0,0,0,0.57);height: 32px;background-color:palette(base);outline:0px;}" -- "QComboBox QAbstractItemView::item:hover{border-radius:0px;font-size:13px;color(palette(windowText));background-color:#3D6BE5;outline:0px;}" - ); - this->setObjectName("MonitorTitle"); - this->setStyleSheet("QFrame#MonitorTitle{background:rgba(255,255,255,0);border-top-left-radius:6px;border-top-right-radius:6px;color: palette(windowText);}"); -@@ -199,9 +166,6 @@ - m_changeBox->setStyleSheet("QComboBox{background:rgba(255,255,255,0.08);border-radius:6px;color:rgba(255,255,255,0.57)}" - "QComboBox::drop-down{border:0px;width:30px;}" - "QComboBox::down-arrow{image:url(:/img/down_arrow.png);}" -- "QComboBox QAbstractItemView {margin:0px 0px 0px 0px;padding: 0px 0px;border-radius:0px;background-color:palette(windowText);outline:0px;}" -- "QComboBox QAbstractItemView::item{border-radius:0px;font-size:13px;color:rgba(255,255,255,0.57);height: 32px;background-color:palette(base);outline:0px;}" -- "QComboBox QAbstractItemView::item:hover{border-radius:0px;font-size:13px;color(palette(windowText));background-color:#3D6BE5;outline:0px;}" - ); - this->setObjectName("MonitorTitle"); - this->setStyleSheet("QFrame#MonitorTitle{background:rgba(13,14,14,0);border-top-left-radius:6px;border-top-right-radius:6px;color: palette(windowText);}"); -@@ -211,11 +175,15 @@ - - void MonitorTitleWidget::initFontSize() - { -+ if (!fontSettings) { -+ fontSize = DEFAULT_FONT_SIZE; -+ return; -+ } - connect(fontSettings,&QGSettings::changed,[=](QString key) - { - if("systemFont" == key || "systemFontSize" == key) - { -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - } - QFont font; - font.setPointSize(fontSize-2); -@@ -225,7 +193,7 @@ - changeBoxFont.setPointSize(fontSize-2); - m_changeBox->setFont(changeBoxFont); - }); -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - } - - MonitorTitleWidget::~MonitorTitleWidget() -@@ -413,40 +381,39 @@ - { - QWidget *w = new QWidget; - m_titleMiddleLayout = new QHBoxLayout(w); -- m_titleMiddleLayout->setContentsMargins(0, 18, 0, 0); -+ m_titleMiddleLayout->setContentsMargins(0, 0, 0, 0); - - titleLabel = new QLabel; - QLabel *picLabel = new QLabel; - QFont font; - font.setPointSize(fontSize-2); - titleLabel->setFont(font); -- titleLabel->setStyleSheet("QLabel{background-color:transparent;color:palette(windowText);}"); -+// titleLabel->setStyleSheet("QLabel{background-color:transparent;color:palette(windowText);}"); - titleLabel->setText(tr("Kylin System Monitor")); - picLabel->setPixmap(QPixmap(":img/ukui-system-monitor.png")); - m_titleMiddleLayout->addWidget(picLabel); - m_titleMiddleLayout->addWidget(titleLabel); - m_topLayout->addWidget(w); -+// m_topLayout->setContentsMargins(0,0,0,20); - } - - void MonitorTitleWidget::initTitlebarRightContent() - { - QWidget *w = new QWidget; - m_titleRightLayout = new QHBoxLayout(w); -- m_titleRightLayout->setContentsMargins(0, 0, 1, 0); -+ m_titleRightLayout->setContentsMargins(0, 8, 8, 0); - m_titleRightLayout->setSpacing(0); - - m_topLayout->addWidget(w, 1, Qt::AlignRight); - - // MyTristateButton *minBtn = new MyTristateButton; -- QIcon iconMin(tr(":/img/minimize.png")); - QPushButton *minBtn = new QPushButton(this); - minBtn->setToolTip(tr("minimize")); -- //minBtn->setStyleSheet("QPushButton{background-color:transparent;}"); -- minBtn->setIcon(iconMin); -- minBtn->setIconSize(QSize(25,25)); -- //minBtn->setObjectName("MinButton"); -- minBtn->setProperty("useIconHighlightEffect", true); -- minBtn->setProperty("iconHighlightEffectMode", 1); -+ minBtn->setIcon(QIcon::fromTheme("window-minimize-symbolic")); -+// minBtn->setProperty("useIconHighlightEffect", true); -+// minBtn->setProperty("iconHighlightEffectMode", 1); -+ minBtn->setProperty("isWindowButton", 0x1); -+ minBtn->setProperty("useIconHighlightEffect", 0x2); - minBtn->setFlat(true); - connect(minBtn, SIGNAL(clicked()), this, SLOT(onMinBtnClicked())); - // connect(minBtn, &MyTristateButton::clicked, this, [=] { -@@ -461,12 +428,14 @@ - // maxBtn->setStyleSheet("QPushButton{background-color:#ffffff;}"); - // maxBtn->setObjectName("MaxButton"); - -- maxTitleBtn->setIconSize(QSize(25,25)); -- maxTitleBtn->setProperty("useIconHighlightEffect", true); -- maxTitleBtn->setProperty("iconHighlightEffectMode", 1); -+// maxTitleBtn->setIconSize(QSize(25,25)); -+// maxTitleBtn->setProperty("useIconHighlightEffect", true); -+// maxTitleBtn->setProperty("iconHighlightEffectMode", 1); -+ maxTitleBtn->setProperty("isWindowButton", 0x1); -+ maxTitleBtn->setProperty("useIconHighlightEffect", 0x2); - maxTitleBtn->setFlat(true); -- QIcon iconMax(tr(":/img/fullscreen.png")); -- maxTitleBtn->setIcon(iconMax); -+// QIcon iconMax(tr(":/img/fullscreen.png")); -+ maxTitleBtn->setIcon(QIcon::fromTheme("window-maximize-symbolic")); - // maxTitleBtn->setIcon(QIcon::fromTheme("window-maximize-symbolic")); - connect(maxTitleBtn, SIGNAL(clicked()), this, SLOT(onMaxBtnClicked())); - // connect(maxBtn, &MyTristateButton::clicked, sthis, [=] { -@@ -487,17 +456,18 @@ - // } - // }); - // MyTristateButton *closeBtn = new MyTristateButton; -- QIcon iconClose(tr(":/img/close.png")); -+// QIcon iconClose(tr(":/img/close.png")); - QPushButton *closeBtn = new QPushButton(this); - closeBtn->setToolTip(tr("close")); - //closeBtn->setStyleSheet("QPushButton{background-color:transparent;}"); -- closeBtn->setIcon(iconClose); -- closeBtn->setIconSize(QSize(25,25)); -- //closeBtn->setObjectName("CloseButton"); -- closeBtn->setProperty("useIconHighlightEffect", true); -- closeBtn->setProperty("iconHighlightEffectMode", 1); -+// closeBtn->setIcon(iconClose); -+// closeBtn->setIconSize(QSize(25,25)); -+ closeBtn->setIcon(QIcon::fromTheme("window-close-symbolic")); - closeBtn->setFlat(true); -+ closeBtn->setProperty("isWindowButton", 0x2); -+ closeBtn->setProperty("useIconHighlightEffect", 0x8); - connect(closeBtn, SIGNAL(clicked()), this, SLOT(onCloseBtnClicked())); -+ //进行GSettings设置,记忆用户选择的combox的内容 - whichNum = ifsettings->get(WHICH_MENU).toInt(); - m_changeBox->setCurrentIndex(whichNum); - connect(m_changeBox,SIGNAL(currentIndexChanged(int)),this,SLOT(switchChangeItemProcessSignal(int))); -@@ -544,8 +514,6 @@ - - void MonitorTitleWidget::resizeEvent(QResizeEvent *event) - { -- qDebug()<geometry().x()<<"-----------------------"<geometry().y(); -- - if(window()->isMaximized()) - { - maxTitleBtn->setIcon(QIcon::fromTheme("window-restore-symbolic")); -@@ -555,8 +523,7 @@ - else - { - // maxTitleBtn->setIcon(QIcon::fromTheme("window-restore-symbolic")); -- QIcon iconMax(tr(":/img/fullscreen.png")); -- maxTitleBtn->setIcon(iconMax); -+ maxTitleBtn->setIcon(QIcon::fromTheme("window-maximize-symbolic")); - } - } - -diff -Naur ukui-system-monitor-1.0.1/src/monitortitlewidget.h ukui-system-monitor-1.0.1~/src/monitortitlewidget.h ---- ukui-system-monitor-1.0.1/src/monitortitlewidget.h 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/monitortitlewidget.h 2021-12-08 22:53:56.806056602 +0800 -@@ -107,7 +107,7 @@ - QWidget *emptyWidget = nullptr; - QWidget *emptyWidget2 = nullptr; - -- int fontSize; -+ float fontSize; - - QGSettings *qtSettings; - QGSettings *fontSettings; -diff -Naur ukui-system-monitor-1.0.1/src/networkflow.cpp ukui-system-monitor-1.0.1~/src/networkflow.cpp ---- ukui-system-monitor-1.0.1/src/networkflow.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/networkflow.cpp 2021-12-08 22:53:56.969642429 +0800 -@@ -111,7 +111,6 @@ - - if(QGSettings::isSchemaInstalled(idd)) - { -- qDebug()<<";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"; - qtSettings = new QGSettings(idd); - } - -diff -Naur ukui-system-monitor-1.0.1/src/processcategory.h ukui-system-monitor-1.0.1~/src/processcategory.h ---- ukui-system-monitor-1.0.1/src/processcategory.h 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/processcategory.h 2021-12-08 22:53:56.820140149 +0800 -@@ -29,11 +29,11 @@ - class ProcessCategory : public QWidget - { - Q_OBJECT -- -+ - public: - explicit ProcessCategory(int tabIndex, QWidget *parent = 0); - ~ProcessCategory(); -- -+ - signals: - void activeWhoseProcessList(int index); - -diff -Naur ukui-system-monitor-1.0.1/src/processdialog.cpp ukui-system-monitor-1.0.1~/src/processdialog.cpp ---- ukui-system-monitor-1.0.1/src/processdialog.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/processdialog.cpp 2021-12-08 22:53:56.981559277 +0800 -@@ -117,21 +117,22 @@ - connect(m_processListWidget, &ProcessListWidget::rightMouseClickedItems, this, &ProcessDialog::popupMenu, Qt::QueuedConnection); - m_layout->addWidget(m_processListWidget); - -+//记录要显示进程的内容类别 - whose_processes = "user"; - proSettings->beginGroup("PROCESS"); - whose_processes = proSettings->value("WhoseProcesses", whose_processes).toString(); - proSettings->endGroup(); - -- int tabIndex = 1; -- if (whose_processes == "active") { -- tabIndex = 0; -- } -- else if (whose_processes == "all") { -- tabIndex = 2; -- } -- else { -- tabIndex = 1; -- } -+// int tabIndex = 1; -+// if (whose_processes == "active") { -+// tabIndex = 0; -+// } -+// else if (whose_processes == "all") { -+// tabIndex = 2; -+// } -+// else { -+// tabIndex = 1; -+// } - - - // QWidget *w = new QWidget; -@@ -457,37 +458,28 @@ - ** should probably have a total_time_last gint in the ProcInfo structure */ - glibtop_get_cpu(&cpu); - -- - this->frequency = cpu.frequency; - - this->cpu_total_time = MAX(cpu.total - this->cpu_total_time_last, 1); - this->cpu_total_time_last = cpu.total; - -- -- -- - // FIXME: not sure if glibtop always returns a sorted list of pid - // but it is important otherwise refresh_list won't find the parent - std::sort(pid_list, pid_list + proclist.number); - -- //---------------start---------------------- - typedef std::list ProcList; - ProcList addition; - guint i; --// int addPid; - for(i = 0; i < proclist.number; ++i) - { - ProcessWorker *info = ProcessWorker::find(pid_list[i]); - -- qDebug()<<"refreshProcessList:mapsize2"<addFlowNetPerSec = pidMap[pid_list[i]]; -- qDebug()<<"---------------------------------------wwj"<addFlowNetPerSec; - info = new ProcessWorker(pid_list[i], this->num_cpus, this->cpu_total_time,this->addFlowNetPerSec); - ProcessWorker::all[info->pid] = info; - info->mNumFlownet = numAddFlowNetPerSec; -@@ -497,8 +489,7 @@ - //create the process object when the pid's object doesn't exist - else - { -- qDebug()<<"refreshProcessList:else"<num_cpus, this->cpu_total_time,"0 KB/S"); -+ info = new ProcessWorker(pid_list[i], this->num_cpus, this->cpu_total_time, "0 KB/S"); - ProcessWorker::all[info->pid] = info; - info->mNumFlownet = 0; - } -@@ -520,10 +511,6 @@ - glibtop_proc_mem procmem; - glibtop_get_proc_mem(&procmem, info->pid); - info->mem = procmem.resident - procmem.share; --// if(info->mem == 0) --// { -- --// } - - glibtop_get_proc_state(&procstate, info->pid); - info->status = procstate.state; -@@ -661,16 +648,13 @@ - info.m_numDiskIo = numDiskioPersec; //磁盘读写整数值 - // info.commandLine = QString::fromStdString(it->second->arguments); //命令行 - -- - item = new ProcessListItem(info); - items << item; - } - -- - this->updateStatus(items); - - g_free (pid_list); -- //---------------end---------------------- - } - - void ProcessDialog::refreshLine(const QString &procname, quint64 rcv, quint64 sent, int pid, unsigned int uid, const QString &devname) -@@ -686,20 +670,19 @@ - { - flowNetPrevMap[pid] = 0;//save prev data - } -- qDebug()<<"ProcessDialog::refreshLine:pid<new_count(tmptotalFlowNetPerSec - flowNetPrevMap[pid],pid); -- qDebug()<<"ProcessDialog::refreshLine:deltaFlowNetPerSec"<::const_iterator it = pidMap.find(pid); -- qDebug()<<"ProcessDialog::pidMap"< - #include - #include -+#include - - class ProcessManager; - class ProcessCategory; -diff -Naur ukui-system-monitor-1.0.1/src/processlistitem.cpp ukui-system-monitor-1.0.1~/src/processlistitem.cpp ---- ukui-system-monitor-1.0.1/src/processlistitem.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/processlistitem.cpp 2021-12-08 22:53:56.861307443 +0800 -@@ -27,6 +27,8 @@ - static int number = 0; - - ProcessListItem::ProcessListItem(ProcData info) -+ :qtSettings(nullptr) -+ ,fontSettings(nullptr) - { - - const QByteArray idd(THEME_QT_SCHEMA); -@@ -53,28 +55,27 @@ - ProcessListItem::~ProcessListItem() - { - if (qtSettings) { -- delete qtSettings; -+ qtSettings->deleteLater(); - } -- if(fontSettings) -- { -- delete fontSettings; -+ -+ if (fontSettings) { -+ fontSettings->deleteLater(); - } - } - - void ProcessListItem::initThemeMode() - { -+ if (!qtSettings) { -+ return; -+ } - //监听主题改变 - connect(qtSettings, &QGSettings::changed, this, [=](const QString &key) - { -- - if (key == "styleName") - { --// auto style = qtSettings->get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); -- //repaint(); -+ qDebug() << "Current theme mode: "<< currentThemeMode << endl; -+// repaint(); - } - }); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -@@ -82,14 +83,19 @@ - - void ProcessListItem::initFontSize() - { -- connect(fontSettings,&QGSettings::changed,this,[=](QString key) -+ if (!fontSettings) { -+ fontSize = DEFAULT_FONT_SIZE; -+ return; -+ } -+ -+ connect(fontSettings, &QGSettings::changed, this, [=](QString key) - { - if("systemFont" == key || "systemFontSize" == key) - { -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - } - }); -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - } - - bool ProcessListItem::isSameItem(ProcessListItem *item) -@@ -102,18 +108,6 @@ - QPainterPath path; - path.addRect(QRectF(rect.x(), rect.y(), rect.width(), rect.height())); - painter->setOpacity(0.5);//0.1 -- if (level == 0) { -- //painter->fillPath(path, QColor("#131414")); -- //painter->setOpacity(0.08); -- } -- else if (level == 1) { --// painter->fillPath(path, QColor("#131414")); --// painter->setOpacity(0.08); -- } -- else { --// painter->fillPath(path, QColor("#131414")); --// painter->setOpacity(0.08); -- } - } - - void ProcessListItem::drawBackground(QRect rect, QPainter *painter, int index, bool isSelect ,QString currentThemeMode) -@@ -122,23 +116,10 @@ - path.addRect(QRectF(rect)); - - if (isSelect) { --//// painter->setOpacity(0.08); --// if(currentThemeMode == "ukui-white") --// { --// painter->setOpacity(0.08); --// painter->fillPath(path, QColor("#000000")); --// } -- --// if(currentThemeMode == "ukui-black") --// { --// painter->setOpacity(0.08); --// painter->fillPath(path, QColor("#ffffff")); --// } - painter->setOpacity(0.08); - painter->fillPath(path,QColor("palette(windowText)")); - -- } -- else { -+ } else { - painter->setOpacity(0.08); - if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { -@@ -149,18 +130,12 @@ - { - painter->fillPath(path,QColor("#131414")); - } -- --// if (index % 2 == 0) { --// painter->fillPath(path, QColor("#ffffff")); --// } else { --// painter->fillPath(path, QColor("#e9eef0")); --// } - } - } - - void ProcessListItem::drawForeground(QRect rect, QPainter *painter, int column, int, bool isSelect, bool isSeparator) - { -- setFontSize(*painter, fontSize+2); -+ setFontSize(*painter, fontSize + 2); - painter->setOpacity(0.85); - //painter->setPen(QPen(QColor(QPalette::Base))); - if (column == 0) { -@@ -184,22 +159,21 @@ - QFont font = painter->font(); - QFontMetrics fm(font); - QString procName = fm.elidedText(name, Qt::ElideRight, nameMaxWidth); -- painter->drawText(QRect(rect.x() + iconSize + padding * 2, rect.y(), nameMaxWidth, rect.height()), Qt::AlignLeft | Qt::AlignVCenter, procName); -+ painter->drawText(QRect(rect.x() + iconSize + padding * 2, rect.y(), nameMaxWidth, rect.height()), Qt::AlignCenter, procName); - if (!isSeparator) { - painter->setOpacity(0.8); - QPainterPath separatorPath; - separatorPath.addRect(QRectF(rect.x() + rect.width() - 1, rect.y(), 1, rect.height())); - painter->fillPath(separatorPath, QColor("#e0e0e0")); - } -- } -- else if (column == 1) { -+ } else if (column == 1) { - if (!m_data.user.isEmpty()) { - QString name = m_data.user; - int userMaxWidth = rect.width() - padding * PADDING ; - QFont font = painter->font(); - QFontMetrics fm(font); - QString userName = fm.elidedText(name, Qt::ElideRight, userMaxWidth); -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignLeft | Qt::AlignVCenter, userName); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, userName); - } - if (!isSeparator) { - painter->setOpacity(0.8); -@@ -210,7 +184,7 @@ - } - else if (column == 2) { - // if (!m_data.m_status.isEmpty()) { -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignRight | Qt::AlignVCenter, m_data.m_diskio); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, m_data.m_diskio); - // } - if (!isSeparator) { - painter->setOpacity(0.8); -@@ -229,7 +203,7 @@ - else { - //this->drawCellBackground(QRect(rect.x(), rect.y(), rect.width(), rect.height()), painter, 2); - } -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignRight | Qt::AlignVCenter, QString("%1%").arg(m_data.cpu)); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, QString("%1%").arg(m_data.cpu)); - if (!isSeparator) { - painter->setOpacity(0.8); - QPainterPath separatorPath; -@@ -238,7 +212,7 @@ - } - } - else if (column == 4) { -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - padding, rect.height()), Qt::AlignRight | Qt::AlignVCenter, QString("%1").arg(m_data.pid)); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - padding, rect.height()), Qt::AlignCenter, QString("%1").arg(m_data.pid)); - if (!isSeparator) { - painter->setOpacity(0.8); - // QPainterPath separatorPath; -@@ -251,7 +225,7 @@ - QFont font = painter->font(); - QFontMetrics fm(font); - QString flownet = fm.elidedText(m_data.m_flownet, Qt::ElideRight, flownetMaxWidth); -- painter->drawText(QRect(rect.x(), rect.y(), flownetMaxWidth, rect.height()), Qt::AlignCenter | Qt::AlignVCenter, flownet); -+ painter->drawText(QRect(rect.x(), rect.y(), flownetMaxWidth, rect.height()), Qt::AlignCenter, flownet); - if (!isSeparator) { - painter->setOpacity(0.8); - // QPainterPath separatorPath; -@@ -273,13 +247,13 @@ - else { - //this->drawCellBackground(QRect(rect.x(), rect.y(), rect.width(), rect.height()), painter, 2); - } -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignRight | Qt::AlignVCenter, Memory); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, Memory); - g_free(memory); - } - else - { - QString Memory = "0 MiB"; -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignRight | Qt::AlignVCenter, Memory); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, Memory); - } - if (!isSeparator) { - painter->setOpacity(0.8); -@@ -289,7 +263,7 @@ - } - } - else if (column == 7) { -- painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignLeft | Qt::AlignVCenter, getNiceLevel(m_data.m_nice)); -+ painter->drawText(QRect(rect.x(), rect.y(), rect.width() - textPadding, rect.height()), Qt::AlignCenter, getNiceLevel(m_data.m_nice)); - if (!isSeparator) { - painter->setOpacity(0.8); - QPainterPath separatorPath; -diff -Naur ukui-system-monitor-1.0.1/src/processlistitem.h ukui-system-monitor-1.0.1~/src/processlistitem.h ---- ukui-system-monitor-1.0.1/src/processlistitem.h 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/processlistitem.h 2021-12-08 22:53:56.817973450 +0800 -@@ -81,7 +81,7 @@ - int padding; - int textPadding; - -- int fontSize; -+ float fontSize; - - QGSettings *qtSettings; - QGSettings *fontSettings; -diff -Naur ukui-system-monitor-1.0.1/src/processlistwidget.cpp ukui-system-monitor-1.0.1~/src/processlistwidget.cpp ---- ukui-system-monitor-1.0.1/src/processlistwidget.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/processlistwidget.cpp 2021-12-08 22:53:56.879724391 +0800 -@@ -52,8 +52,7 @@ - ,m_mouseAtScrollArea(false) - ,m_mouseDragScrollbar(false) - { -- installEventFilter(this); --//theme settings -+ - const QByteArray idd(THEME_QT_SCHEMA); - - if(QGSettings::isSchemaInstalled(idd)) -@@ -69,7 +68,7 @@ - } - - initFontSize(); --//other settings -+ - this->m_searchFunc = NULL; - this->m_searchText = ""; - this->m_lastItem = NULL; -@@ -115,18 +114,6 @@ - - } - --void ProcessListWidget::resizeEvent(QResizeEvent *event) --{ --// if(window()->isMaximized()) --// { --// widths<<300; --// } --// else --// { --// widths << 170 << 90 << 80 << 70 << 80 << -1 << 80 << 80;//-1时让该行填充所有剩余空间 --// } --} -- - void ProcessListWidget::initThemeMode() - { - //监听主题改变 -@@ -521,9 +508,9 @@ - - void ProcessListWidget::hideScrollbar() - { -- this->m_mouseAtScrollArea = true; -+ this->m_mouseAtScrollArea = false; - this->m_origOffset = this->m_offSet; --qDebug()<<"hideScrollbar"; -+ - repaint(); - } - -@@ -850,45 +837,18 @@ - //标题文字左上方的排序箭头图标 - if (this->m_currentSortIndex == counter) - { -- if(counter == 0) -+ if(counter == 0 || counter == 5) - { - qDebug()<<"m_currentSortIndex------"<m_isSort) - { - qDebug()<<"m_isSort----------"<m_isSort) -- { -- qDebug()<<"m_isSort----------"<isMaximized()) -- { -- painter.drawPixmap(QPoint(rect().x() + posX + 580, rect().y() + 20), m_downArrowPixmap); -- } -- else -- { -- painter.drawPixmap(QPoint(rect().x() + posX + 80, rect().y() + 20), m_downArrowPixmap); -- } -- } -- else -- { -- if(window()->isMaximized()) -- { -- painter.drawPixmap(QPoint(rect().x() + posX + 580, rect().y() + 20), m_upArrowPixmap); -- } -- else -- { -- painter.drawPixmap(QPoint(rect().x() + posX + 80, rect().y() + 20), m_upArrowPixmap); -- } -+ painter.drawPixmap(QPoint(rect().x() + posX + 100, rect().y() + 20), m_upArrowPixmap); - } - } - else -@@ -905,23 +865,13 @@ - painter.drawPixmap(QPoint(rect().x() + posX + 60, rect().y() + 20), m_upArrowPixmap); - } - } --// opacity = 0; --// if (this->m_mouseDragScrollbar) { --// opacity = 0.8; --// } --// else { --// if (this->m_mouseAtScrollArea) --// opacity = 0.7; --// else --// opacity = 0.5; --// } - } - - //标题文字 - painter.setOpacity(0.57); - QFont font = painter.font(); - // font.setPointSize(10); -- font.setPixelSize(fontSize+1); -+ font.setPixelSize(fontSize); - painter.setFont(font); - if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { -@@ -936,7 +886,7 @@ - - // if (this->columnTitles[counter] == tr("Process Name") || this->columnTitles[counter] == tr("Flownet Persec")) - if (this->columnTitles[counter] == tr("Process Name")) -- painter.drawText(QRect(posX + this->m_titlePadding, 0, itemWidth, this->m_titleHeight), Qt::AlignLeft | Qt::AlignVCenter, this->columnTitles[counter]); -+ painter.drawText(QRect(posX + this->m_titlePadding, 0, itemWidth, this->m_titleHeight), Qt::AlignCenter, this->columnTitles[counter]); - else - painter.drawText(QRect(posX, 0, itemWidth - this->m_titlePadding, this->m_titleHeight), Qt::AlignCenter, this->columnTitles[counter]); - -@@ -967,11 +917,11 @@ - painter.setOpacity(1); - QPainterPath backgroundPath; - backgroundPath.addRect(QRectF(rect().x(), rect().y() + this->m_titleHeight, rect().width(), rect().height() - this->m_titleHeight)); --// painter.fillPath(backgroundPath, QColor("#ffffff")); -+// painter.fillPath(backgroundPath, QColor("#CC00FF")); - - //进程信息 - QPainterPath scrollAreaPath; -- scrollAreaPath.addRect(QRectF(rect().x(), rect().y() + this->m_titleHeight, rect().width(), getTheScrollAreaHeight())); -+ scrollAreaPath.addRect(QRectF(rect().x(), rect().y() + this->m_titleHeight, rect().width(), getTheScrollAreaHeight() - 5)); - - int rowCounter = 0; - -@@ -1037,61 +987,37 @@ - //垂直滚动条 - if (this->m_mouseAtScrollArea) { - paintScrollbar(&painter); -- } else if (this->m_origOffset != this->m_offSet) { -+ } else/* if (this->m_origOffset != this->m_offSet) */{ - paintScrollbar(&painter); - readyToHideScrollbar(); - } - } - --bool ProcessListWidget::eventFilter(QObject *obj, QEvent *event) -+void ProcessListWidget::paintScrollbar(QPainter *painter) - { -- if(event->type() == QEvent::Enter) -- { -- opacity = 0; -+ if (this->getItemsTotalHeight() > getTheScrollAreaHeight()) { -+ qreal opacitry = 0; - if (this->m_mouseDragScrollbar) { -- opacity = 0.8; -+ opacitry = 0.8; - } - else { - if (this->m_mouseAtScrollArea) -- opacity = 0.7; -+ opacitry = 0.7; - else -- opacity = 0.5; -+ opacitry = 0.5; - } -- repaint(); -- } -- -- if(event->type() == QEvent::Leave) -- { -- opacity =0.2; -- } -- return false; --} -- --void ProcessListWidget::paintScrollbar(QPainter *painter) --{ -- if (this->getItemsTotalHeight() > getTheScrollAreaHeight()) { --// qreal opacitry = 0; --// if (this->m_mouseDragScrollbar) { --// opacitry = 0.8; --// } --// else { --// if (this->m_mouseAtScrollArea) --// opacitry = 0.7; --// else --// opacitry = 0.5; --// } - - int barWidth = (this->m_mouseAtScrollArea || this->m_mouseDragScrollbar) ? this->m_scrollbarWidth : 6; - int barY = getScrollbarY(); - int barHeight = getScrollbarHeight(); -- painter->setOpacity(opacity); -+ painter->setOpacity(opacitry); - QPainterPath path; - path.addRoundedRect( - QRectF(rect().x() + rect().width() - barWidth - 4, barY + 2, barWidth, barHeight - 2 * 2), 2, 2);//2 is radius -- painter->fillPath(path, QColor("#0B95D7")); -+ painter->fillPath(path, QColor("#808080")); - - QPen pen; -- pen.setColor(QColor("#0B95D7")); -+ pen.setColor(QColor("#808080")); - pen.setWidth(1); - painter->setOpacity(0); - painter->setPen(pen); -@@ -1195,7 +1121,7 @@ - - int ProcessListWidget::getScrollbarHeight() - { -- return std::max(static_cast(getTheScrollAreaHeight() / (this->getItemsTotalHeight() * 1.0) * rect().height()), 30);//30 is min height -+ return std::max(static_cast(getTheScrollAreaHeight() / (this->getItemsTotalHeight() * 1.0) * rect().height()), 80);//30 is min height - } - - QList ProcessListWidget::getSearchedItems(QList items) -diff -Naur ukui-system-monitor-1.0.1/src/processlistwidget.h ukui-system-monitor-1.0.1~/src/processlistwidget.h ---- ukui-system-monitor-1.0.1/src/processlistwidget.h 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/processlistwidget.h 2021-12-08 22:53:56.793056404 +0800 -@@ -100,8 +100,8 @@ - void paintEvent(QPaintEvent *); - void wheelEvent(QWheelEvent *event); - void paintScrollbar(QPainter *painter); -- bool eventFilter(QObject *obj, QEvent *event); -- void resizeEvent(QResizeEvent *event); -+// bool eventFilter(QObject *obj, QEvent *event); -+// void resizeEvent(QResizeEvent *event); - - private: - QTimer *m_hideScrollbarTimer = nullptr; -@@ -135,7 +135,7 @@ - QPixmap m_downArrowPixmap; - QPixmap m_upArrowPixmap; - -- int fontSize; -+ float fontSize; - - QGSettings *qtSettings; - QGSettings *fontSettings; -diff -Naur ukui-system-monitor-1.0.1/src/propertiesdialog.cpp ukui-system-monitor-1.0.1~/src/propertiesdialog.cpp ---- ukui-system-monitor-1.0.1/src/propertiesdialog.cpp 2021-12-08 22:01:33.491196799 +0800 -+++ ukui-system-monitor-1.0.1~/src/propertiesdialog.cpp 2021-12-08 22:53:56.927391785 +0800 -@@ -43,7 +43,7 @@ - this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint/* | Qt::WindowCloseButtonHint*/| Qt::WindowStaysOnTopHint); - // this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid - --// this->setAttribute(Qt::WA_TranslucentBackground); -+ this->setAttribute(Qt::WA_TranslucentBackground); - this->setAttribute(Qt::WA_Resized, false); - // this->setMaximumSize(480, 600); - // this->setMinimumWidth(320); -@@ -83,9 +83,8 @@ - m_logoLabel->setPixmap(QPixmap(":/res/sub_logo.png")); - - closeButton = new QPushButton(this); --// closeButton->setAutoDefault(true); --// closeButton->setFocusPolicy(Qt::NoFocus); --// closeButton->setEnabled(false); -+ closeButton->setProperty("isWindowButton", 0x2); -+ closeButton->setProperty("useIconHighlightEffect", 0x8); - closeButton->setObjectName("CloseButton"); - closeButton->setIcon(QIcon::fromTheme("window-close-symbolic")); - closeButton->setFlat(true); -@@ -99,12 +98,12 @@ - // }); - - m_iconLabel = new QLabel(); -- m_iconLabel->setStyleSheet("QLabel{background:transparent;border:none;}"); -+// m_iconLabel->setStyleSheet("QLabel{background:transparent;border:none;}"); - m_iconLabel->setFixedSize(48, 48); - m_iconLabel->setContentsMargins(0, 0, 0, 0); - - m_titleLabel = new QLabel(); -- m_titleLabel->setStyleSheet("QLabel{background-color:transparent;font-size:18px;color:#000000;}"); -+// m_titleLabel->setStyleSheet("QLabel{background-color:transparent;font-size:18px;color:#000000;}"); - m_titleLabel->setFixedWidth(230); - m_titleLabel->setWordWrap(true); - -@@ -113,14 +112,15 @@ - - m_topRightLayout->addWidget(m_logoLabel, 0, Qt::AlignTop | Qt::AlignRight); - m_topRightLayout->addWidget(closeButton, 0, Qt::AlignTop | Qt::AlignRight); -+ m_topRightLayout->setContentsMargins(0,8,8,0); - - QLabel *topSplit = new QLabel(); -- topSplit->setStyleSheet("QLabel{background: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #f1f1f1, stop:1 #e0e0e0);}"); -+// topSplit->setStyleSheet("QLabel{background: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #f1f1f1, stop:1 #e0e0e0);}"); - // topSplit->setStyleSheet("QLabel{background: qlineargradient(x1:0, y1:0, x2:1, y2:0,stop:0 #f1f1f1, stop:1 #e0e0e0);}"); - topSplit->setFixedSize(320, 1); - - QLabel *bottomSplit = new QLabel(); -- bottomSplit->setStyleSheet("QLabel{background: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #f1f1f1, stop:1 #e0e0e0);}"); -+// bottomSplit->setStyleSheet("QLabel{background: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 #f1f1f1, stop:1 #e0e0e0);}"); - // bottomSplit->setStyleSheet("QLabel{background: qlineargradient(x1:0, y1:0, x2:1, y2:0,stop:0 #f1f1f1, stop:1 #e0e0e0);}"); - bottomSplit->setFixedSize(320, 1); - -@@ -165,11 +165,11 @@ - titleList << QObject::tr("User name:") << QObject::tr("Process name:") << QObject::tr("flownet per second:") << QObject::tr("CPU Time:") << QObject::tr("Started Time:"); - for (int i = 0; i < titleList.length(); ++i) { - QLabel *titleLabel = new QLabel(titleList.value(i)); -- titleLabel->setStyleSheet("QLabel{background-color:transparent;font-size:12px;color:#999999;}"); -+// titleLabel->setStyleSheet("QLabel{background-color:transparent;font-size:12px;color:#999999;}"); - titleLabel->setMinimumHeight(20); - - QLabel *infoLabel = new QLabel(); -- infoLabel->setStyleSheet("QLabel{background-color:transparent;font-size:12px;color:#000000;}"); -+// infoLabel->setStyleSheet("QLabel{background-color:transparent;font-size:12px;color:#000000;}"); - infoLabel->setWordWrap(true); - infoLabel->setMinimumHeight(28); - infoLabel->setMinimumWidth(220); -@@ -181,85 +181,6 @@ - infoGrid->addWidget(infoLabel); - } - -- /*userTitleLabel = new QLabel(QString("%1:").arg(tr("User name"))); -- userTitleLabel->setStyleSheet("QLabel { background-color : transparent; color : #666666; }"); -- userTitleLabel->setFixedWidth(100); -- userTitleLabel->setAlignment(Qt::AlignRight); -- -- userLabel = new QLabel(); -- userLabel->setStyleSheet("QLabel { background-color : transparent; color : #000000; }"); -- -- userLayout->addWidget(userTitleLabel); -- userLayout->addWidget(userLabel); -- userLayout->addSpacing(20); -- -- nameTitleLabel = new QLabel(QString("%1:").arg(tr("Process name"))); -- nameTitleLabel->setStyleSheet("QLabel { background-color : transparent; color : #666666; }"); -- nameTitleLabel->setFixedWidth(100); -- nameTitleLabel->setAlignment(Qt::AlignRight); -- -- m_appNameLabel = new QLabel(); -- m_appNameLabel->setStyleSheet("QLabel { background-color : transparent; color : #000000; }"); -- -- nameLayout->addWidget(nameTitleLabel); -- nameLayout->addWidget(m_appNameLabel); -- nameLayout->addSpacing(20); -- -- cmdlineTitleLabel = new QLabel(QString("%1:").arg(tr("Command line"))); -- cmdlineTitleLabel->setStyleSheet("QLabel { background-color : transparent; color : #666666; }"); -- cmdlineTitleLabel->setFixedWidth(100); -- cmdlineTitleLabel->setAlignment(Qt::AlignRight); --// cmdlineTitleLabel->setWordWrap(true); --// cmdlineTitleLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); -- -- cmdlineLabel = new QLabel(); -- cmdlineLabel->setStyleSheet("QLabel { background-color : transparent; color : #000000; }"); -- cmdlineLabel->setWordWrap(true); -- cmdlineLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); -- -- cmdlineLayout->addWidget(cmdlineTitleLabel); -- cmdlineLayout->addWidget(cmdlineLabel); -- cmdlineLayout->addSpacing(20); -- -- cpuDurationTitleLabel = new QLabel(QString("%1:").arg(tr("CPU Time"))); -- cpuDurationTitleLabel->setStyleSheet("QLabel { background-color : transparent; color : #666666; }"); -- cpuDurationTitleLabel->setFixedWidth(100); -- cpuDurationTitleLabel->setAlignment(Qt::AlignRight); -- -- cpuDurationLabel = new QLabel(); -- cpuDurationLabel->setStyleSheet("QLabel { background-color : transparent; color : #000000; }"); -- cpuDurationLabel->setWordWrap(true); -- -- cpuDurationLayout->addWidget(cpuDurationTitleLabel); -- cpuDurationLayout->addWidget(cpuDurationLabel); -- cpuDurationLayout->addSpacing(20); -- -- startTimeTitleLabel = new QLabel(QString("%1:").arg(tr("Started Time"))); -- startTimeTitleLabel->setStyleSheet("QLabel { background-color : transparent; color : #666666; }"); -- startTimeTitleLabel->setFixedWidth(100); -- startTimeTitleLabel->setAlignment(Qt::AlignRight); -- -- startTimeLabel = new QLabel(); -- startTimeLabel->setStyleSheet("QLabel { background-color : transparent; color : #000000; }"); -- startTimeLabel->setWordWrap(true); -- -- startTimeLayout->addWidget(startTimeTitleLabel); -- startTimeLayout->addWidget(startTimeLabel); -- startTimeLayout->addSpacing(20); -- -- m_layout->addWidget(closeButton, 0, Qt::AlignTop | Qt::AlignRight); -- m_layout->addSpacing(20); -- m_layout->addWidget(m_iconLabel, 0, Qt::AlignHCenter); -- m_layout->addSpacing(14); -- m_layout->addWidget(m_titleLabel, 0, Qt::AlignHCenter); -- m_layout->addSpacing(20); -- m_layout->addLayout(userLayout); -- m_layout->addLayout(nameLayout); -- m_layout->addLayout(cmdlineLayout); -- m_layout->addLayout(cpuDurationLayout); -- m_layout->addLayout(startTimeLayout); -- m_layout->addSpacing(20);*/ -- - this->moveToCenter(); - - this->initProcproperties(); -@@ -474,7 +395,7 @@ - QPainter painter(this); - - //绘制圆角矩形 -- painter.setPen(QPen(QColor("#808080"), 0));//边框颜色 #3f96e4 -+ painter.setPen(QPen(QColor("#808080"), 0) );//边框颜色 #3f96e4 - // painter.setPen(Qt::NoPen); - painter.setBrush(this->palette().base());//背景色 - painter.setRenderHint(QPainter::Antialiasing, true); -diff -Naur ukui-system-monitor-1.0.1/src/renicedialog.cpp ukui-system-monitor-1.0.1~/src/renicedialog.cpp ---- ukui-system-monitor-1.0.1/src/renicedialog.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/renicedialog.cpp 2021-12-08 22:53:56.856974044 +0800 -@@ -36,9 +36,9 @@ - { - this->setWindowFlags(Qt::FramelessWindowHint); - this->setFixedSize(464, 240); -- this->setFixedSize(464+SHADOW_LEFT_TOP_PADDING+SHADOW_LEFT_TOP_PADDING, 240+SHADOW_RIGHT_BOTTOM_PADDING+SHADOW_RIGHT_BOTTOM_PADDING); -- this->setContentsMargins(SHADOW_LEFT_TOP_PADDING,SHADOW_LEFT_TOP_PADDING,SHADOW_RIGHT_BOTTOM_PADDING,SHADOW_RIGHT_BOTTOM_PADDING); -- this->setStyleSheet("QDialog{border: 1px solid white;border-radius:1px;background-color: #ffffff;}"); -+ this->setFixedSize(464+SHADOW_LEFT_TOP_PADDING+SHADOW_LEFT_TOP_PADDING, 300+SHADOW_RIGHT_BOTTOM_PADDING+SHADOW_RIGHT_BOTTOM_PADDING); -+// this->setContentsMargins(SHADOW_LEFT_TOP_PADDING,SHADOW_LEFT_TOP_PADDING,SHADOW_RIGHT_BOTTOM_PADDING,SHADOW_RIGHT_BOTTOM_PADDING); -+// this->setStyleSheet("QDialog{border: 1px solid white;border-radius:1px;background-color: #ffffff;}"); - this->setWindowIcon(QIcon(":/res/ukui-system-monitor.png")); - this->setAttribute(Qt::WA_DeleteOnClose); - -@@ -48,8 +48,24 @@ - m_mainLayout->setContentsMargins(0,0,0,0); - m_mainLayout->setSpacing(20); - m_mainLayout->setMargin(0); -- m_titleBar = new MyTitleBar(title, false, this); -- m_titleBar->setFixedSize(this->width(), TITLE_BAR_HEIGHT); -+// m_titleBar = new MyTitleBar(title, false, this); -+ QLabel *titleLabel = new QLabel; -+ titleLabel->setText(title); -+ QPushButton *closeButton = new QPushButton(this); -+ closeButton->setFlat(true); -+ closeButton->setIcon(QIcon::fromTheme("window-close-symbolic")); -+ closeButton->setProperty("isWindowButton", 0x2); -+ closeButton->setProperty("useIconHighlightEffect", 0x8); -+ -+ QHBoxLayout *title_H_BoxLayout = new QHBoxLayout(); -+ QHBoxLayout *closeBtn_H_BoxLayout = new QHBoxLayout(); -+ title_H_BoxLayout->setContentsMargins(0,0,0,0); -+ title_H_BoxLayout->setSpacing(0); -+ title_H_BoxLayout->addSpacing(15); -+ title_H_BoxLayout->addWidget(titleLabel); -+ closeBtn_H_BoxLayout->addWidget(closeButton,1,Qt::AlignRight); -+ closeBtn_H_BoxLayout->setContentsMargins(0,8,17,0); -+// m_titleBar->setFixedSize(this->width(), TITLE_BAR_HEIGHT); - - m_titleLabel = new QLabel(); - m_titleLabel->setFixedWidth(80); -@@ -69,12 +85,12 @@ - h_layout->addWidget(m_valueLabel); - - m_valueStrLabel = new QLabel; -- m_valueStrLabel->setStyleSheet("QLabel{background-color:transparent;color:#000000;font-size:13px;font-weight:bold;}"); -+// m_valueStrLabel->setStyleSheet("QLabel{background-color:transparent;color:#000000;font-size:13px;font-weight:bold;}"); - m_valueStrLabel->setAlignment(Qt::AlignCenter); - m_valueStrLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - - m_tipTitle = new QLabel; -- m_tipTitle->setStyleSheet("QLabel{background-color:transparent;color:#000000;font-size:12px;font-weight:bold;}"); -+// m_tipTitle->setStyleSheet("QLabel{background-color:transparent;color:#000000;font-size:12px;font-weight:bold;}"); - m_tipTitle->setText(tr("Note:")); - m_tipLabel = new QLabel; - m_tipLabel->setWordWrap(true);//QLabel自动换行 -@@ -116,7 +132,8 @@ - v_layout->addLayout(tip_layout); - v_layout->addLayout(btn_layout); - -- m_mainLayout->addWidget(m_titleBar); -+ m_mainLayout->addLayout(closeBtn_H_BoxLayout); -+ m_mainLayout->addLayout(title_H_BoxLayout); - m_mainLayout->addLayout(v_layout); - - connect(m_slider, &QSlider::valueChanged, [=] (int value) { -@@ -125,20 +142,20 @@ - m_valueStrLabel->setText(levelStr); - }); - -- connect(m_titleBar, SIGNAL(minSignal()), this, SLOT(hide())); -- connect(m_titleBar, SIGNAL(closeSignal()), this, SLOT(onClose())); -+// connect(m_titleBar, SIGNAL(minSignal()), this, SLOT(hide())); -+// connect(m_titleBar, SIGNAL(closeSignal()), this, SLOT(onClose())); - connect(m_cancelbtn, SIGNAL(clicked(bool)), this, SLOT(onClose())); -- -+ connect(closeButton,SIGNAL(clicked(bool)),this,SLOT(onClose())); - connect(m_changeBtn, &QPushButton::clicked, [=] (bool b) { - emit this->resetReniceValue(m_slider->value()); - }); - - //边框阴影效果 -- QGraphicsDropShadowEffect *shadow_effect = new QGraphicsDropShadowEffect(this); -- shadow_effect->setBlurRadius(5); -- shadow_effect->setColor(QColor(0, 0, 0, 127)); -- shadow_effect->setOffset(2, 4); -- this->setGraphicsEffect(shadow_effect); -+// QGraphicsDropShadowEffect *shadow_effect = new QGraphicsDropShadowEffect(this); -+// shadow_effect->setBlurRadius(5); -+// shadow_effect->setColor(QColor(0, 0, 0, 127)); -+// shadow_effect->setOffset(2, 4); -+// this->setGraphicsEffect(shadow_effect); - - // this->moveCenter(); - -@@ -148,7 +165,7 @@ - - ReniceDialog::~ReniceDialog() - { -- delete m_titleBar; -+// delete m_titleBar; - delete m_valueStrLabel; - - QLayoutItem *child; -@@ -233,3 +250,26 @@ - - QDialog::mouseMoveEvent(event); - } -+ -+void ReniceDialog::paintEvent(QPaintEvent *event) -+{ -+ QPainter painter(this); -+ -+ //绘制圆角矩形 -+ painter.setPen(QPen(QColor("#808080"), 0));//边框颜色 -+// painter.setBrush(QColor("#e9eef0"));//背景色 #0d87ca -+ painter.setBrush(this->palette().base()); -+ painter.setRenderHint(QPainter::Antialiasing, true); -+ painter.setOpacity(1); -+ QRectF r(0 / 2.0, 0 / 2.0, width() - 0, height() - 0);//左边 上边 右边 下边 -+ painter.drawRoundedRect(r, 4, 4); -+ -+ -+ //绘制背景色 -+// QPainterPath path; -+// path.addRect(QRectF(rect())); -+// painter.setOpacity(1); -+// painter.fillPath(path, QColor("#ffffff")); -+ -+ QDialog::paintEvent(event); -+} -diff -Naur ukui-system-monitor-1.0.1/src/renicedialog.h ukui-system-monitor-1.0.1~/src/renicedialog.h ---- ukui-system-monitor-1.0.1/src/renicedialog.h 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/renicedialog.h 2021-12-08 22:53:56.911141537 +0800 -@@ -51,6 +51,7 @@ - void mousePressEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); - void mouseMoveEvent(QMouseEvent *event); -+ void paintEvent(QPaintEvent *event); - - private: - QVBoxLayout *m_mainLayout = nullptr; -diff -Naur ukui-system-monitor-1.0.1/src/resourcesdialog.cpp ukui-system-monitor-1.0.1~/src/resourcesdialog.cpp ---- ukui-system-monitor-1.0.1/src/resourcesdialog.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/resourcesdialog.cpp 2021-12-08 22:53:56.838557096 +0800 -@@ -171,17 +171,13 @@ - m_stack->setCurrentWidget(m_cpuWidget); - - /*m_hlayout->addWidget(m_resourcesCategory); --// m_hlayout->addLayout(m_vlayout); -+ m_hlayout->addLayout(m_vlayout); - m_hlayout->addWidget(m_stack);*/ - QWidget *placeWidget = new QWidget(); - placeWidget->setFixedWidth(34); - splitter->addWidget(m_resourcesCategory); - splitter->addWidget(placeWidget); - splitter->addWidget(m_stack); -- qDebug()<<"m_resourcesCategory"<width()<height(); -- qDebug()<<"m_stack"<width()<height(); -- qDebug()<<"m_resourcesCategory"<geometry().x()<geometry().y(); -- qDebug()<<"m_stack"<geometry().x()<geometry().y(); - m_hlayout->addWidget(splitter); - - connect(this, SIGNAL(updateNetworkStatus(long,long,long,long)), m_networkWidget, SLOT(onUpdateNetworkStatus(long,long,long,long)), Qt::QueuedConnection); -diff -Naur ukui-system-monitor-1.0.1/src/resourcesindicator.cpp ukui-system-monitor-1.0.1~/src/resourcesindicator.cpp ---- ukui-system-monitor-1.0.1/src/resourcesindicator.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/resourcesindicator.cpp 2021-12-08 22:53:57.008643024 +0800 -@@ -41,7 +41,6 @@ - ,m_outsideBorderColor(Qt::transparent) - { - typeObject = flag; -- qDebug()<<"typeObject---"<get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); - repaint(); - updateBgColor(); - } -@@ -168,11 +157,8 @@ - - void ResourcesIndicator::updateBgColor() - { -- qDebug()<<"Resoruce"; - switch (m_state) { - case Hover: -- qDebug()<<"Hover---"; --// if() - this->m_outsideBorderColor = Qt::transparent; - if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { -@@ -184,37 +170,26 @@ - } - break; - case Press: -- qDebug()<<"press---"; - this->m_outsideBorderColor = Qt::transparent; - this->m_bgColor = QColor("#f6fcfe"); - break; - case Checked: -- qDebug()<<"1234567879.000"; - // this->m_outsideBorderColor = QColor("#0973b4"); - this->m_outsideBorderColor = Qt::transparent; -- if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") -- { -+ if (currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") { - this->m_bgColor = QColor(0x13,0x14,0x14,19); //#e9f8fd -- } -- else -- { -+ } else { - this->m_bgColor = QColor(0xff,0xff,0xff,9); - } - // this->m_bgColor = palette().color(QPalette::Base); - break; - default: -- qDebug()<<"123456789."; - this->m_outsideBorderColor = Qt::transparent; - // this->m_bgColor = QColor("#ffffff"); - // this->m_outsideBorderColor = palette().color(QPalette::Base); -- if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") -- { -- qDebug()<<"ifiamcommingin"; -+ if (currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") { - this->m_bgColor = QColor(0xff,0xff,0xff,0); -- } -- else if(currentThemeMode == "ukui-dark" || currentThemeMode == "ukui-black") -- { -- qDebug()<<"iiiiiiiiiiiii"; -+ } else if (currentThemeMode == "ukui-dark" || currentThemeMode == "ukui-black") { - this->m_bgColor = QColor(0x13,0x14,0x14,0); - } - break; -@@ -226,11 +201,7 @@ - { - if (m_state == state) - return; -- qDebug()<<"9517538246"; -- qDebug()<<"normal"<m_posX, this->m_rectTopPadding, this->m_rectTotalWidth, this->height()-(this->m_rectTotalHeight - convertPercent)); --// if(typeObject == 0) --// { --// painter.setOpacity(0.06); --// painter.setBrush(QColor("#0973b4")); --// } -- --// if(typeObject == 1) --// { --// painter.setOpacity(0.06); --// painter.setBrush(QColor("#9528b4")); --// } - - QRect occupyRect(this->m_posX, this->m_rectTopPadding + this->m_rectTotalHeight - convertPercent, this->m_rectTotalWidth, convertPercent); - // painter.drawRoundedRect(occupyRect); - painter.drawRect(this->m_posX, this->m_rectTopPadding + this->m_rectTotalHeight - convertPercent, this->m_rectTotalWidth, convertPercent); -- qDebug()<<"this->->->->"<m_posX<m_rectTopPadding + this->m_rectTotalHeight - convertPercent<m_rectTotalWidth<->->->"<m_posX<m_rectTopPadding + this->m_rectTotalHeight - convertPercent<m_rectTotalWidth<m_title); - -diff -Naur ukui-system-monitor-1.0.1/src/singleProcessNet/inode2prog.cpp ukui-system-monitor-1.0.1~/src/singleProcessNet/inode2prog.cpp ---- ukui-system-monitor-1.0.1/src/singleProcessNet/inode2prog.cpp 2021-12-08 22:01:33.495530200 +0800 -+++ ukui-system-monitor-1.0.1~/src/singleProcessNet/inode2prog.cpp 2021-12-08 22:53:57.415982570 +0800 -@@ -192,7 +192,7 @@ - DIR * proc = opendir ("/proc"); - - if (proc == 0) { -- std::cerr << "Error reading /proc, needed to get inode-to-pid-maping\n"; -+ std::cerr << "Error reading /proc, needed to get inode-to-pid-maping\n"; - exit(1); - } - -diff -Naur ukui-system-monitor-1.0.1/src/systemmonitor.cpp ukui-system-monitor-1.0.1~/src/systemmonitor.cpp ---- ukui-system-monitor-1.0.1/src/systemmonitor.cpp 2021-12-08 22:01:33.491196799 +0800 -+++ ukui-system-monitor-1.0.1~/src/systemmonitor.cpp 2021-12-08 22:53:56.871057592 +0800 -@@ -54,6 +54,8 @@ - SystemMonitor::SystemMonitor(QWidget *parent) - : QFrame(parent) - , mousePressed(false) -+ , opacitySettings(nullptr) -+ , qtSettings(nullptr) - { - // this->setStyleSheet("QFrame{border: 1px solid #121212;border-radius:1px;background-color:#1f1f1f;}"); - // this->setAttribute(Qt::WA_DeleteOnClose); -@@ -61,22 +63,8 @@ - this->setObjectName("SystemMonitor"); - - this->setWindowFlags(Qt::FramelessWindowHint); //set for no windowhint --// this->setAttribute(Qt::WA_TranslucentBackground);//背景透明 -+ this->setAttribute(Qt::WA_TranslucentBackground);//背景透明 - this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); --// QPainterPath path; --// auto rect = this->rect(); --// rect.adjust(0,0,-0,-0); --// path.addRoundedRect(rect, 6, 6); --// setProperty("blurRegion", QRegion(path.toFillPolygon().toPolygon())); --// this->setStyleSheet("QWidget{border:none;border-radius:6px;}"); -- --// this->setObjectName("ParentObjectOnly"); --// this->setStyleSheet("QFrame#ParentObjectOnly{""background:rgba(19,19,20,0.7);" --// "border:1px solid rgba(255, 255, 255, 0.05);" --// "border-radius:6px;" --// "}"); -- --// this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid - - const QByteArray idd(THEME_QT_SCHEMA); - -@@ -92,15 +80,14 @@ - opacitySettings = new QGSettings(idtrans); - } - -+ getOsRelease(); -+ - this->setAutoFillBackground(true); - // this->setMouseTracking(true); - // installEventFilter(this); - - this->setWindowTitle(tr("Kylin System Monitor")); --// this->setWindowIcon(QIcon(":/model/res/plugin/processmanager.png")); --// this->setWindowIcon(QIcon(":/img/processmanager.png")); -- -- this->setWindowIcon(QIcon::fromTheme("ukui-system-monitor")); -+ this->setWindowIcon(QIcon::fromTheme("ukui-system-monitor")); - - - //this->setFixedSize(900, 600); -@@ -114,17 +101,10 @@ - this->initPanelStack(); - this->initConnections(); - initThemeMode(); -- connect(m_titleWidget,SIGNAL(changeProcessItemDialog(int)),process_dialog,SLOT(onActiveWhoseProcess(int))); -+ connect(m_titleWidget,SIGNAL(changeProcessItemDialog(int)),process_dialog,SLOT(onActiveWhoseProcess(int))); //配置文件中为whoseprocess赋值 - getTransparentData(); -- //边框阴影效果 --// QGraphicsDropShadowEffect *shadow_effect = new QGraphicsDropShadowEffect(this); --// shadow_effect->setBlurRadius(5); --// shadow_effect->setColor(QColor(0, 0, 0, 127)); --// shadow_effect->setOffset(2, 4); --// this->setGraphicsEffect(shadow_effect); -- -- - this->moveCenter(); -+ qDebug()<<"--+--"<get(key).toString(); --// qApp->setStyle(new InternalStyle(style)); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"监听主题改变-------------------->"<setStyle(new InternalStyle(currentThemeMode)); - } - }); - currentThemeMode = qtSettings->get(MODE_QT_KEY).toString(); -- qDebug()<<"hahahahaaha"<keys(); - if (keys.contains("transparency")) - { -- m_transparency = opacitySettings->get("transparency").toDouble(); -+ m_transparency = opacitySettings->get("transparency").toString().toDouble(); - } - } - repaint(); - }); -- m_transparency = opacitySettings->get("transparency").toDouble(); --// if(!opacitySettings) --// { --// m_transparency = 0.7; --// return; --// } --// QStringList keys = opacitySettings->keys(); --// if(keys.contains("transparenty")) --// { --// m_transparency = opacitySettings->get("transparency").toDouble(); --// } -+ -+ QStringList keys = opacitySettings->keys(); -+ if(keys.contains("transparency")) -+ { -+ m_transparency = opacitySettings->get("transparency").toString().toDouble(); -+ } - } - - SystemMonitor::~SystemMonitor() -@@ -261,23 +232,17 @@ - // 绘制一个背景 - p.save(); - p.fillPath(rectPath,palette().color(QPalette::Base)); --// p.fillPath(rectPath,QColor(0,0,0)); - p.restore(); - - QStyleOption opt; - opt.init(this); - style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); -- KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(rectPath.toFillPolygon().toPolygon())); - } - - void SystemMonitor::resizeEvent(QResizeEvent *e) - { - if (m_titleWidget) { - m_titleWidget->resize(width() - 2, MONITOR_TITLE_WIDGET_HEIGHT); --// if (e->oldSize() != e->size()) { --// emit m_titleWidget->updateMaxBtn(); --// m_titleWidget->onUpdateMaxBtnStatusChanged(); --// } - } - if (m_sysMonitorStack) { - m_sysMonitorStack->resize(width() - 2, this->height() - MONITOR_TITLE_WIDGET_HEIGHT - 2); -@@ -405,7 +370,7 @@ - - m_sysMonitorStack->resize(width() - 2, this->height() - TITLE_WIDGET_HEIGHT); - m_sysMonitorStack->move(1, TITLE_WIDGET_HEIGHT); -- qDebug()<width()<<"---------------------"<height(); -+// qDebug() << "System monitor size(w x h): " << m_sysMonitorStack->width() << " x " << m_sysMonitorStack->height(); - //m_sysMonitorStack->setFixedSize(898,500); - - // m_sysMonitorStack->setMouseTracking(false); -@@ -565,6 +530,20 @@ - primaryGeometry.y() + (primaryGeometry.height() - this->height())/2); - } - -+void SystemMonitor::getOsRelease() -+{ -+ QFile file("/etc/lsb-release"); -+ if (!file.open(QIODevice::ReadOnly)) qDebug() << "Read file Failed."; -+ while (!file.atEnd()) { -+ QByteArray line = file.readLine(); -+ QString str(line); -+ if (str.contains("DISTRIB_ID")){ -+ version=str.remove("DISTRIB_ID="); -+ version=str.remove("\n"); -+ } -+ } -+} -+ - void SystemMonitor::closeEvent(QCloseEvent *event) - { - event->accept(); -@@ -621,11 +600,14 @@ - - void SystemMonitor::keyPressEvent(QKeyEvent *event) - { -- if(event->key() == Qt::Key_F1) -+ if(version != "Ubuntu") - { -- if(!daemonIsNotRunning()) -+ if(event->key() == Qt::Key_F1) - { -- showGuide(qAppName()); -+ if(!daemonIsNotRunning()) -+ { -+ showGuide(qAppName()); -+ } - } - } - } -diff -Naur ukui-system-monitor-1.0.1/src/systemmonitor.h ukui-system-monitor-1.0.1~/src/systemmonitor.h ---- ukui-system-monitor-1.0.1/src/systemmonitor.h 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/systemmonitor.h 2021-12-08 22:53:57.011893074 +0800 -@@ -82,6 +82,7 @@ - private: - int daemonIsNotRunning(); - void showGuide(QString appName); -+ void getOsRelease(); - private: - // WId mWindow; - QStackedWidget *m_sysMonitorStack = nullptr; -@@ -100,6 +101,7 @@ - - QGSettings *opacitySettings; - double m_transparency; -+ QString version; - }; - - #endif // SYSTEMMONITOR_H -diff -Naur ukui-system-monitor-1.0.1/widgets/mydialog.cpp ukui-system-monitor-1.0.1~/widgets/mydialog.cpp ---- ukui-system-monitor-1.0.1/widgets/mydialog.cpp 2021-12-08 22:01:33.492280149 +0800 -+++ ukui-system-monitor-1.0.1~/widgets/mydialog.cpp 2021-12-08 22:53:56.760555909 +0800 -@@ -39,7 +39,7 @@ - this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint | Qt::WindowCloseButtonHint); - // this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//Attention: Qt::WindowCloseButtonHint make showMinimized() valid - --// this->setAttribute(Qt::WA_TranslucentBackground); -+ this->setAttribute(Qt::WA_TranslucentBackground); - // this->setAttribute(Qt::WA_DeleteOnClose, false); - this->setAttribute(Qt::WA_Resized, false); - -diff -Naur ukui-system-monitor-1.0.1/widgets/mysearchedit.cpp ukui-system-monitor-1.0.1~/widgets/mysearchedit.cpp ---- ukui-system-monitor-1.0.1/widgets/mysearchedit.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/widgets/mysearchedit.cpp 2021-12-08 22:53:56.747555711 +0800 -@@ -31,12 +31,12 @@ - : QFrame(parent) - ,m_showCurve(QEasingCurve::OutCubic) - ,m_hideCurve(QEasingCurve::InCubic) -+ ,fontSettings(nullptr) - { - const QByteArray idd(THEME_QT_SCHEMA); - - if(QGSettings::isSchemaInstalled(idd)) - { --// qDebug()<<"MySearchEdit--------------1------------->"<setWindowFlags(Qt::FramelessWindowHint); -- //this->setStyleSheet("QFrame{background-color:#00376a;border-radius:0px;}"); --// this->setFixedSize(200,32); -- qDebug()<<"mySearchEdit.width"<width()<<"mySearchEidt.height"<height(); - --// this->setObjectName("SearchBtn"); --// this->setStyleSheet("QFrame#SearchBtn{background:rgba(77,88,99,0.08);border-radius:4px;}"); - m_searchBtn = new QLabel; - m_searchBtn->setStyleSheet("QLabel{background-color:transparent;border:none;background-image:url(:/img/search.png);}"); - m_searchBtn->setFixedSize(SEARCHBUTTON, SEARCHBUTTON); -@@ -103,17 +98,12 @@ - connect(m_pClearTextButton, &QPushButton::clicked, this, [=](){ - m_edit->setText(""); - }); -- //m_edit->setPlaceholderText("enter process info"); -- -- - - m_placeHolder = new QLabel; //about the font - QFont font; - font.setPointSize(fontSize-2); - m_placeHolder->setFont(font); - --// m_placeHolder->setStyleSheet("QLabel{background-color:transparent;color:rgba(0,0,0,0.57);margin: 2 0 0 0 px;}"); -- - initThemeMode(); - - m_animation = new QPropertyAnimation(m_edit, "minimumWidth"); -@@ -143,8 +133,6 @@ - // layout->addWidget(m_clearBtn); - // layout->setAlignment(m_clearBtn, Qt::AlignCenter); - -- -- - layout->setSpacing(0); - layout->setContentsMargins(0, 0, 0, 0); - -@@ -156,14 +144,11 @@ - // connect(m_clearBtn, &MyTristateButton::clicked, this, [=] { - // this->clearAndFocusEdit(); - // }); -- --// qDebug()<width()<<"----------------------------------------------"<height(); - } - - - QPixmap MySearchEdit::drawSymbolicColoredPixmap(const QPixmap &source) - { --// qDebug()<<"wwj,wozhendeshishishishsishishsishsihsishsishsishsihs"< 0) - { -- color.setRed(255); -- color.setGreen(255); -- color.setBlue(255); -- img.setPixelColor(x, y, color); -+ color.setRed(255); -+ color.setGreen(255); -+ color.setBlue(255); -+ img.setPixelColor(x, y, color); - } - } - } - return QPixmap::fromImage(img); -- } -- -- else -- { -+ } else { - QImage img = source.toImage(); - for (int x = 0; x < img.width(); x++) - { -@@ -214,10 +193,10 @@ - auto color = img.pixelColor(x, y); - if (color.alpha() > 0) - { -- color.setRed(0); -- color.setGreen(0); -- color.setBlue(0); -- img.setPixelColor(x, y, color); -+ color.setRed(0); -+ color.setGreen(0); -+ color.setBlue(0); -+ img.setPixelColor(x, y, color); - } - } - } -@@ -401,7 +380,7 @@ - - if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { -- m_edit->setStyleSheet("QLineEdit{background:transparent;border-radius:4px;color:#00000;padding-right:12px;padding-bottom: 2px;}"); //#CC00FF transparent -+ m_edit->setStyleSheet("QLineEdit{background:transparent;border-radius:4px;color:#000000;padding-right:12px;padding-bottom: 2px;}"); //#CC00FF transparent - m_placeHolder->setStyleSheet("QLabel{background-color:transparent;color:rgba(0,0,0,0.57);margin: 2 0 0 0 px;}"); - this->setObjectName("SearchBtn"); - this->setStyleSheet("QFrame#SearchBtn{background:rgba(13,14,14,0.08);border-radius:4px;}"); -@@ -424,7 +403,7 @@ - m_pClearTextButton->setIcon(drawSymbolicColoredPixmap(QPixmap::fromImage(QIcon::fromTheme(":/img/button-close-default-add-background-three.svg").pixmap(24,24).toImage()))); - if(currentThemeMode == "ukui-light" || currentThemeMode == "ukui-default" || currentThemeMode == "ukui-white") - { -- m_edit->setStyleSheet("QLineEdit{background:transparent;border-radius:4px;color:#00000;padding-right:12px;padding-bottom: 2px;}"); //#CC00FF transparent -+ m_edit->setStyleSheet("QLineEdit{background:transparent;border-radius:4px;color:#000000;padding-right:12px;padding-bottom: 2px;}"); //#CC00FF transparent - m_placeHolder->setStyleSheet("QLabel{background-color:transparent;color:rgba(0,0,0,0.57);margin: 2 0 0 0 px;}"); - this->setObjectName("SearchBtn"); - this->setStyleSheet("QFrame#SearchBtn{background:rgba(13,14,14,0.08);border-radius:4px;}"); -@@ -441,11 +420,15 @@ - - void MySearchEdit::initFontSize() - { -+ if (!fontSettings) { -+ fontSize = DEFAULT_FONT_SIZE; -+ return; -+ } - connect(fontSettings,&QGSettings::changed,[=](QString key) - { - if("systemFont" == key || "systemFontSize" == key) - { -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - } - QFont font; - font.setPointSize(fontSize - 2); -@@ -454,5 +437,5 @@ - searchLineFont.setPointSize(fontSize); - m_edit->setFont(searchLineFont); - }); -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - } -diff -Naur ukui-system-monitor-1.0.1/widgets/mysearchedit.h ukui-system-monitor-1.0.1~/widgets/mysearchedit.h ---- ukui-system-monitor-1.0.1/widgets/mysearchedit.h 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/widgets/mysearchedit.h 2021-12-08 22:53:56.771389407 +0800 -@@ -85,7 +85,7 @@ - QPushButton *m_pClearTextButton =nullptr; - QPixmap drawSymbolicColoredPixmap(const QPixmap &source); - -- int fontSize; -+ float fontSize; - - QGSettings *qtSettings; - QGSettings *fontSettings; -diff -Naur ukui-system-monitor-1.0.1/widgets/myunderlinebutton.cpp ukui-system-monitor-1.0.1~/widgets/myunderlinebutton.cpp ---- ukui-system-monitor-1.0.1/widgets/myunderlinebutton.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/widgets/myunderlinebutton.cpp 2021-12-08 22:53:56.768139358 +0800 -@@ -30,6 +30,7 @@ - : QWidget(parent) - ,m_state(Normal) - ,m_isChecked(false) -+ ,fontSettings(nullptr) - { - const QByteArray idd(THEME_QT_SCHEMA); - -@@ -112,18 +113,22 @@ - - void MyUnderLineButton::initFontSize() - { -- connect(fontSettings,&QGSettings::changed,[=](QString key) -+ if (!fontSettings) { -+ fontSize = DEFAULT_FONT_SIZE; -+ return; -+ } -+ connect(fontSettings, &QGSettings::changed, [=](QString key) - { - if("systemFont" == key || "systemFontSize" == key) - { -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - } - // repaint(); - QFont font; - font.setPointSize(fontSize -2); - m_textLabel->setFont(font); - }); -- fontSize = fontSettings->get(FONT_SIZE).toInt(); -+ fontSize = fontSettings->get(FONT_SIZE).toString().toFloat(); - QFont font; - font.setPointSize(fontSize -2); - m_textLabel->setFont(font); -diff -Naur ukui-system-monitor-1.0.1/widgets/myunderlinebutton.h ukui-system-monitor-1.0.1~/widgets/myunderlinebutton.h ---- ukui-system-monitor-1.0.1/widgets/myunderlinebutton.h 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/widgets/myunderlinebutton.h 2021-12-08 22:53:56.744305662 +0800 -@@ -75,7 +75,7 @@ - //QLabel *m_underlineLabel = nullptr; - QVBoxLayout *m_layout = nullptr; - -- int fontSize; -+ float fontSize; - - QGSettings *qtSettings; - QGSettings *fontSettings; diff --git a/hide_idle_rate.patch b/hide_idle_rate.patch deleted file mode 100644 index 049297daa5799afe3eb9c879f1a3beaf38b971e6..0000000000000000000000000000000000000000 --- a/hide_idle_rate.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Naur ukui-system-monitor-1.0.1/src/cpuratewidget.cpp ukui-system-monitor-1.0.1~/src/cpuratewidget.cpp ---- ukui-system-monitor-1.0.1/src/cpuratewidget.cpp 2019-05-27 15:48:18.000000000 +0800 -+++ ukui-system-monitor-1.0.1~/src/cpuratewidget.cpp 2021-08-31 22:55:24.266527686 +0800 -@@ -353,6 +353,9 @@ - m_cpuIdleRateText = new QLabel; - m_cpuIdleRateText->setStyleSheet("QLabel{background:transparent;font-size:20px;color:palette(windowTexg);}"); - -+ m_cpuIdleRateText->hide(); -+ m_cpuIdleRateTitle->hide(); -+ - m_cpuRunTimeTitle = new QLabel; - // m_cpuRunTimeTitle->setStyleSheet("QLabel{background:transparent;font-size:12px;color:palette(windowTexg);}"); - m_cpuRunTimeTitle->setText(tr("The running time of system")); diff --git a/ukui-system-monitor-1.0.1.tar.gz b/ukui-system-monitor-1.0.1.tar.gz deleted file mode 100644 index cc6686ef309543dae5a4ab3154410113009e2b85..0000000000000000000000000000000000000000 Binary files a/ukui-system-monitor-1.0.1.tar.gz and /dev/null differ diff --git a/ukui-system-monitor-3.1.2.tar.gz b/ukui-system-monitor-3.1.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f9880b31f5975a0bf1a539a1b49b1ea5cb2aab0e Binary files /dev/null and b/ukui-system-monitor-3.1.2.tar.gz differ diff --git a/ukui-system-monitor.spec b/ukui-system-monitor.spec index 98515952590f3046a975807c024e02444c84a0bd..00ee9efba706be54facfacb6e59b820365a759d2 100644 --- a/ukui-system-monitor.spec +++ b/ukui-system-monitor.spec @@ -1,13 +1,14 @@ %define debug_package %{nil} -Name: ukui-system-monitor -Version: 1.0.1 -Release: 18 -Summary: A simple system monitor written in QT -License: GPL-3.0-or-later -URL: http://www.ukui.org -Source0: %{name}-%{version}.tar.gz - -BuildRequires: cmake >= 2.6 +Name: ukui-system-monitor +Version: 3.1.2 +Release: 1 +Summary: Monitor for UKUI desktop environment +License: GPL-3+ and GPL-2+ +URL: http://www.ukui.org +Source0: %{name}-%{version}.tar.gz +Patch01: 0001-modify-version-is-pull.patch +Patch02: 0001-fix-compile-error-of-ukui-system-monitor.patch + BuildRequires: qt5-qtbase-devel >= 5.1 BuildRequires: qt5-qtsvg-devel BuildRequires: qt5-qtscript-devel @@ -15,66 +16,34 @@ BuildRequires: qt5-qttools-devel BuildRequires: pkgconf BuildRequires: glib2-devel >= 2.46.0 BuildRequires: libgtop2-devel +BuildRequires: kf5-kwindowsystem-devel BuildRequires: systemd-devel >= 209 BuildRequires: gsettings-qt-devel BuildRequires: qt5-qtx11extras-devel BuildRequires: libpcap-devel -BuildRequires: kf5-kwindowsystem-devel +BuildRequires: ukui-interface +BuildRequires: qt5-qtcharts-devel +BuildRequires: qt5-qtcharts -#Requires: inotify-hookable -#Requires: bsdutils -Requires: hdparm -Requires: lm_sensors -Requires: ethtool -Requires: lshw -Requires: dmidecode -Requires: kernel-tools -Requires: pciutils -Requires: libpcap - -patch0: 0001-removes-transparency.patch -patch1: hide_idle_rate.patch -patch2: 0001-add-storage-check.patch -patch3: 0002-Fix-the-wrong-maintainer-and-update-changelog.patch -patch4: 0003-Add-libglib2.0-bin-to-Depends.patch -patch5: 0004-Update-README.md.patch -patch6: 0005-Remove-LICENSE-which-is-same-with-COPYING.patch -patch7: 0006-Update-modification-record-in-changelog.patch -patch8: fix-the-bug-about-process-filesystem.patch -patch9: 0007-Fix-the-segmentfault-without-org.ukui.style.patch -patch10: 0008-Update-changelog.patch -patch11: 0009-desktop-add-Tibetan-name-and-introduction.patch -patch12: 0010-add-Support-Tibetan-translation.patch -patch13: 0011-Adapt-QT5.15-to-add-a-fractional-scaling-property.patch -patch14: 0012-Modify-the-Chinese-translation-of-the-Nice-field.patch +Requires: libcap-devel +Requires: glib2-devel %description -A simple system monitor written in QT + UKUI system monitor allows you to graphically view and manipulate the + running processes, It also provides an overview of the resources (such + as CPU and memory) and File Systems on your system. %prep %setup -q -%patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 %build export PATH=%{_qt5_bindir}:$PATH mkdir qmake-build pushd qmake-build %{qmake_qt5} .. -%{make_build} +%{make_build} -j4 popd %install @@ -91,13 +60,19 @@ glib-compile-schemas /usr/share/glib-2.0/schemas/ &> /dev/null || : rm -rf $RPM_BUILD_ROOT %files -%doc debian/changelog +%doc debian/changelog debian/copyright %{_bindir}/ukui-system-monitor %{_datadir}/applications/ukui-system-monitor.desktop -%{_datadir}/icons/hicolor/ukui-system-monitor.png +%{_datadir}/icons/hicolor/* %{_datadir}/glib-2.0/schemas/org.ukui.system-monitor.menu.gschema.xml +%{_datadir}/ukui/ukui-system-monitor.conf +%{_datadir}/kylin-user-guide/data/* +%{_datadir}/ukui-system-monitor/translations/* %changelog +* Mon Dec 31 2022 peijiankang - 3.1.2-1 +- update version to 3.1.2 + * Fri Jul 29 2022 tanyulong - 1.0.1-18 - Modify the Chinese translation of the Nice field