updated splash screen

This commit is contained in:
Oguzhan INAN
2018-02-25 21:28:05 +03:00
parent caa465c21f
commit 80b1ff4e27
4 changed files with 23 additions and 33 deletions

View File

@@ -74,7 +74,7 @@ void App::init()
connect(trayIcon, &QSystemTrayIcon::activated, this, &App::iconActivated);
trayIcon->show();
on_gnomeSettingsBtn_clicked();
on_dashBtn_clicked();
}
void App::iconActivated(QSystemTrayIcon::ActivationReason reason)

View File

@@ -2,10 +2,8 @@
#include <QSplashScreen>
#include <QDebug>
#include "app.h"
#include "utilities.h"
void messageHandler(QtMsgType type,
const QMessageLogContext &context,
const QString &message)
void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message)
{
Q_UNUSED(context)
@@ -33,20 +31,13 @@ void messageHandler(QtMsgType type,
.arg(level)
.arg(message);
static QString logPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/log";
QDir().mkdir(logPath);
static QString logPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
QFile file(logPath + "/stacer.log");
QIODevice::OpenMode openMode;
QIODevice::OpenMode openMode = file.size() > (1L << 20) ? QIODevice::Truncate : QIODevice::Append;
if (file.size() > (1L << 20))
openMode = QIODevice::WriteOnly | QIODevice::Truncate;
else
openMode = QIODevice::WriteOnly | QIODevice::Append;
if (file.open(openMode)) {
if (file.open(QIODevice::WriteOnly | openMode)) {
QTextStream stream(&file);
stream << text << endl;
@@ -55,7 +46,6 @@ void messageHandler(QtMsgType type,
}
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
@@ -65,23 +55,22 @@ int main(int argc, char *argv[])
qApp->setApplicationVersion("1.0.9");
qApp->setWindowIcon(QIcon(":/static/logo.png"));
QPixmap pixmap(":/static/splashscreen.png");
QGraphicsDropShadowEffect *splashShadowEffect = new QGraphicsDropShadowEffect;
splashShadowEffect->setBlurRadius(30);
splashShadowEffect->setColor(QColor(0, 0, 0, 210));
splashShadowEffect->setOffset(0);
QPixmap pixmap(":/static/splashscreen.png");
QSplashScreen splash(pixmap);
splash.setGraphicsEffect(splashShadowEffect);
splash.show();
app.processEvents();
QThread::sleep(10);
// QThread::sleep(10);
// qInstallMessageHandler(messageHandler);
App w;

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -61,18 +61,6 @@ QAbstractScrollArea::corner {
background: transparent;
}
QListWidget {
show-decoration-selected: 0;
}
QListWidget::item {
}
QWidget[active=true] #aptSourceRepositoryItemWidget {
background-color: orange;
}
/**************************
QMENU
***************************/
@@ -733,7 +721,7 @@ QSlider::handle:horizontal {
#packagesList {
border:0;
background-color: transparent;
font-size:11pt;
font-size: 11pt;
}
#packagesList::indicator {
@@ -968,6 +956,15 @@ QComboBox QAbstractItemView {
color: @color05;
}
#aptSourceRepositoryListWidget {
selection-background-color: @color03;
}
#aptSourceRepositoryListWidget::item {
padding: 0 0 0 4;
}
/* - APT Source Repository Item - */
#aptSourceRepositoryItemWidget {
@@ -1104,3 +1101,7 @@ QRadioButton::indicator:checked {
}
#lblCreatedBy {
font-size: 9pt;
color: @color06;
}