Improve Features

Support save current theme setting when exit;
Use QScreen::primaryScreen() instead of QDesktopWidget to get desktop size;
Ensure only one instance will be running at the same time.
This commit is contained in:
zty199
2021-04-20 18:49:17 +08:00
parent e5fe80cb76
commit 9a3d32ee11
5 changed files with 92 additions and 73 deletions

View File

@@ -1,5 +1,7 @@
#include "progressload.h"
#include <DApplicationHelper>
ProgressLoad::ProgressLoad(QWidget *parent) :
QWidget(parent),
m_progess(new QWidget(this)),
@@ -28,13 +30,13 @@ void ProgressLoad::setTheme(bool dark, QColor color)
{
if(dark)
{
plt.setColor(QPalette::Background, QColor(28,28,28));
plt.setColor(QPalette::Background, QColor(40, 40, 40));
setAutoFillBackground(true);
setPalette(plt);
}
else
{
plt.setColor(QPalette::Background, QColor(255,255,255));
plt.setColor(QPalette::Background, QColor(255, 255, 255));
setAutoFillBackground(true);
setPalette(plt);
}