11#include <QGraphicsDropShadowEffect>
28#include <klocalizedstring.h>
36 QGraphicsDropShadowEffect *effect =
new QGraphicsDropShadowEffect(widget);
37 effect->setBlurRadius(4);
38 effect->setOffset(0.5);
39 effect->setColor(QColor(0, 0, 0, 255));
40 widget->setGraphicsEffect(effect);
48 return i18nc(
"Splash image default",
"%1 (default)", text);
53 return i18nc(
"Splash image unavailable",
"%1 (not available)", text);
59 if (artistName.isEmpty()) {
62 return i18nc(
"splash image credit",
"Artwork by: %1", artistName);
70 setWindowTitle(i18n(
"Krita"));
75 setLayout(
new QVBoxLayout());
76 layout()->setContentsMargins(QMargins());
83 m_loadingTextLabel->setStyleSheet(QStringLiteral(
"QLabel { color: #fff; background-color: transparent; }"));
93 m_artCreditsLabel->setStyleSheet(QStringLiteral(
"QLabel { color: #fff; background-color: transparent; font: 10pt; }"));
100 connect(&
m_timer, SIGNAL(timeout()), SLOT(raise()));
108 const int bannerHeight = height * 0.16875;
109 const int marginTop = height * 0.05;
110 const int marginRight = height * 0.1;
113 QPixmap img(
source.resourcePath);
115 if (img.isNull() || img.height() == 0)
return;
118 const int width = height * img.width() / img.height();
120 setFixedSize(width, height);
150 int notAsLarge = larger - 1;
151 QString htmlText = QStringLiteral(
"<span style='font: %3pt;'><span style='font: bold %4pt;'>%1</span><br><i>%2</i></span>")
152 .arg(
m_versionHtml, text.toHtmlEscaped(), QString::number(notAsLarge), QString::number(larger));
195 i18nc(
"Splash screen option showing Kiki",
"Mascot"),
197 i18nc(
"Splash artist name",
"Tyson Tan"),
202 QStringLiteral(
"corpo1"),
203 i18nc(
"Splash screen option without Kiki",
"Plain"),
204 QStringLiteral(
":/splash/corpo1.jpg"),
222 return QStringLiteral(
":/splash/hd.jpg");
224 return QStringLiteral(
":/splash/0.png");
231 qApp->sendPostedEvents();
236 if (!this->parentWidget()) {
238 QWindow *windowHandle = this->windowHandle();
239 QScreen *screen = windowHandle ? windowHandle->screen() :
nullptr;
240 if (windowHandle && !screen) {
247 windowHandle->setScreen(QApplication::primaryScreen());
250 screen = QApplication::primaryScreen();
252 QRect r(QPoint(), size());
253 move(screen->availableGeometry().center() - r.center());
KisMagneticGraph::vertex_descriptor source(typename KisMagneticGraph::edge_descriptor e, KisMagneticGraph g)
static KisAndroidDonations * instance()
static bool isStoreApplication()
static Source getAvailableSource(const QString &key)
void updateSplashImage(const int height)
static QString defaultSplashResourcePath()
static QVector< Source > getSources()
void setLoadingText(QString text)
QLabel * m_artCreditsLabel
QLabel * m_loadingTextLabel
QSvgWidget * m_brandingSvg
static Source getCurrentSource()
static bool canChooseSplashScreen()
KisSplashScreen(int height, QWidget *parent=0, Qt::WindowFlags f=Qt::WindowFlags(Qt::SplashScreen|Qt::FramelessWindowHint))
static void addDropShadow(QWidget *widget)
QIcon loadIcon(const QString &name)
QString artistCredit() const
QString description() const