mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-31 01:04:20 +00:00
update splash screen style #14
This commit is contained in:
parent
ad29beea4f
commit
44b329967c
@ -30,8 +30,8 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
|
||||
QWidget(0, f), curAlignment(0)
|
||||
{
|
||||
// set reference point, paddings
|
||||
int paddingRight = 50;
|
||||
int paddingTop = 50;
|
||||
int paddingRight = 42;
|
||||
int paddingTop = 64;
|
||||
int titleVersionVSpace = 17;
|
||||
int titleCopyrightVSpace = 40;
|
||||
|
||||
@ -59,14 +59,7 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
|
||||
#endif
|
||||
|
||||
QPainter pixPaint(&pixmap);
|
||||
pixPaint.setPen(QColor(100,100,100));
|
||||
|
||||
// draw a slightly radial gradient
|
||||
QRadialGradient gradient(QPoint(0,0), splashSize.width()/devicePixelRatio);
|
||||
gradient.setColorAt(0, Qt::white);
|
||||
gradient.setColorAt(1, QColor(247,247,247));
|
||||
QRect rGradient(QPoint(0,0), splashSize);
|
||||
pixPaint.fillRect(rGradient, gradient);
|
||||
pixPaint.setPen(Qt::white);
|
||||
|
||||
// draw the bitcoin icon, expected size of PNG: 1024x1024
|
||||
QRect rectIcon(QPoint(-150,-122), QSize(430,430));
|
||||
@ -76,6 +69,13 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
|
||||
|
||||
pixPaint.drawPixmap(rectIcon, icon);
|
||||
|
||||
// draw a slightly radial gradient
|
||||
QRadialGradient gradient(QPoint(0,0), splashSize.width()/devicePixelRatio);
|
||||
gradient.setColorAt(0, QColor(255,255,255,100));
|
||||
gradient.setColorAt(1, QColor(0,0,0,30));
|
||||
QRect rGradient(QPoint(0,0), splashSize);
|
||||
pixPaint.fillRect(rGradient, gradient);
|
||||
|
||||
// check font size and drawing with
|
||||
pixPaint.setFont(QFont(font, 33*fontFactor));
|
||||
QFontMetrics fm = pixPaint.fontMetrics();
|
||||
@ -84,7 +84,7 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
|
||||
fontFactor = fontFactor * 176 / titleTextWidth;
|
||||
}
|
||||
|
||||
pixPaint.setFont(QFont(font, 33*fontFactor));
|
||||
pixPaint.setFont(QFont(font, 48*fontFactor));
|
||||
fm = pixPaint.fontMetrics();
|
||||
titleTextWidth = fm.width(titleText);
|
||||
pixPaint.drawText(pixmap.width()/devicePixelRatio-titleTextWidth-paddingRight,paddingTop,titleText);
|
||||
@ -167,7 +167,7 @@ static void InitMessage(SplashScreen *splash, const std::string &message)
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(QString, QString::fromStdString(message)),
|
||||
Q_ARG(int, Qt::AlignBottom|Qt::AlignHCenter),
|
||||
Q_ARG(QColor, QColor(55,55,55)));
|
||||
Q_ARG(QColor, Qt::gray));
|
||||
}
|
||||
|
||||
static void ShowProgress(SplashScreen *splash, const std::string &title, int nProgress, bool resume_possible)
|
||||
|
Loading…
x
Reference in New Issue
Block a user