Commit 39f8f675 authored by Scott Petrovic's avatar Scott Petrovic

Add icon to notification message

parent ba45e6a8
......@@ -321,14 +321,23 @@ void KisWelcomePageWidget::populateRecentDocuments()
void KisWelcomePageWidget::slotUpdateVersionMessage()
{
alertIcon->setIcon(KisIconUtils::loadIcon("warning"));
alertIcon->setVisible(false);
// find out if we need an update...or if this is a development version
// TODO: show app version if dev version. Show version number available and provide link
QString versionText = "";
if (isDevelopmentBuild()) {
// Development build
versionText = i18n("DEV BUILD");
QString versionLabelText = QString("<a style=\"color: " +
blendedColor.name() +
" \" href=\"https://docs.krita.org/en/untranslatable_pages/triaging_bugs.html?"
+ analyticsString + "dev-build" + "\">")
.append(i18n("DEV BUILD")).append("</a>");
versionNotificationLabel->setText(versionLabelText);
alertIcon->setVisible(true);
versionNotificationLabel->setVisible(true);
versionNotificationLabel->setText(versionText); // no link
} else if (newsWidget->hasUpdateAvailable()) {
// build URL for label
......@@ -341,9 +350,10 @@ void KisWelcomePageWidget::slotUpdateVersionMessage()
versionNotificationLabel->setVisible(true);
versionNotificationLabel->setText(versionLabelText);
alertIcon->setVisible(true);
} else {
// message needed... exit
// no message needed... exit
versionNotificationLabel->setVisible(false);
return;
}
......
......@@ -443,6 +443,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<pointsize>18</pointsize>
......@@ -453,6 +459,34 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="alertIcon">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="versionNotificationLabel">
<property name="sizePolicy">
......@@ -470,7 +504,7 @@
<string>Krita X.X.X Update Available</string>
</property>
<property name="indent">
<number>10</number>
<number>2</number>
</property>
<property name="openExternalLinks">
<bool>false</bool>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment