更新文档

This commit is contained in:
feiyangqingyun
2024-02-26 10:35:32 +08:00
parent 1bfab01a92
commit 5a22d22908
17 changed files with 526 additions and 431 deletions

View File

@@ -207,7 +207,7 @@ void CpuMemoryLabel::readData()
void CpuMemoryLabel::setData()
{
cpuPercent = (cpuPercent < 0 ? 0 : cpuPercent);
//cpuPercent = (cpuPercent < 0 ? 0 : cpuPercent);
cpuPercent = (cpuPercent > 100 ? 0 : cpuPercent);
QString msg = QString("CPU %1% Mem %2% ( 已用 %3 MB / 共 %4 MB )").arg(cpuPercent).arg(memoryPercent).arg(memoryUse).arg(memoryAll);
if (showText) {

View File

@@ -132,8 +132,10 @@ void IconHelper::setStyle(QWidget *widget, QList<QAbstractButton *> btns,
IconHelper::IconHelper(const QString &fontFile, const QString &fontName, QObject *parent) : QObject(parent)
{
//判断图形字体是否存在,不存在则加入
//这里暂时限制在同一个项目中只加载一次字体文件
QFontDatabase fontDb;
if (!fontDb.families().contains(fontName) && QFile(fontFile).exists()) {
bool exist = false;//fontDb.families().contains(fontName);
if (!exist && QFile(fontFile).exists()) {
int fontId = fontDb.addApplicationFont(fontFile);
QStringList listName = fontDb.applicationFontFamilies(fontId);
if (listName.count() == 0) {