35 QGraphicsDropShadowEffect *effect =
new QGraphicsDropShadowEffect(widget);
36 effect->setBlurRadius(4);
37 effect->setOffset(0.5);
38 effect->setColor(QColor(0, 0, 0, 255));
39 widget->setGraphicsEffect(effect);
44 , m_versionHtml(qApp->applicationVersion().toHtmlEscaped())
46 setWindowTitle(i18n(
"Krita"));
51 setLayout(
new QVBoxLayout());
52 layout()->setContentsMargins(QMargins());
59 m_loadingTextLabel->setStyleSheet(QStringLiteral(
"QLabel { color: #fff; background-color: transparent; }"));
69 m_artCreditsLabel->setStyleSheet(QStringLiteral(
"QLabel { color: #fff; background-color: transparent; font: 10pt; }"));
76 connect(&
m_timer, SIGNAL(timeout()), SLOT(raise()));
84 const int bannerHeight = height * 0.16875;
85 const int marginTop = height * 0.05;
86 const int marginRight = height * 0.1;
89 QPixmap img(
source.resourcePath);
91 if (img.isNull() || img.height() == 0)
return;
94 const int width = height * img.width() / img.height();
96 setFixedSize(width, height);
134 QString artistCredit = i18nc(
"Normal splash artist name",
"Tyson Tan");
141 QString resourcePath = QStringLiteral(
":/splash/hd.jpg");
143 QString resourcePath = QStringLiteral(
":/splash/0.png");
146 QDate currentDate = QDate::currentDate();
147 if (currentDate > QDate(currentDate.year(), 12, 4) ||
148 currentDate < QDate(currentDate.year(), 1, 9)) {
149 resourcePath = QStringLiteral(
":/splash/1.png");
150 artistCredit = QStringLiteral(
"???")};
154 if (!artistCredit.isEmpty()) {
155 artistCredit = i18nc(
"splash image credit",
"Artwork by: %1", artistCredit);
157 return Source{resourcePath, artistCredit};
168 if (!this->parentWidget()) {
170 QWindow *windowHandle = this->windowHandle();
171 QScreen *screen = windowHandle ? windowHandle->screen() :
nullptr;
172 if (windowHandle && !screen) {
179 windowHandle->setScreen(QApplication::primaryScreen());
182 screen = QApplication::primaryScreen();
184 QRect r(QPoint(), size());
185 move(screen->availableGeometry().center() - r.center());