diff --git a/src/net/updatecheck.cpp b/src/net/updatecheck.cpp
index 49a34b671..a027971cf 100644
--- a/src/net/updatecheck.cpp
+++ b/src/net/updatecheck.cpp
@@ -120,8 +120,11 @@ void UpdateCheck::checkForUpdate()
void UpdateCheck::handleResponse(QNetworkReply* reply)
{
+ qInfo() << "qTox is running version:" << GIT_DESCRIBE;
+
if (isCurrentVersionStable() == false) {
- qWarning() << "qTox is running an unstable version";
+ qWarning() << "qTox is running an unstable version";
+ emit versionIsUnstable();
}
assert(reply != nullptr);
diff --git a/src/net/updatecheck.h b/src/net/updatecheck.h
index 8ca037a80..69d48fdec 100644
--- a/src/net/updatecheck.h
+++ b/src/net/updatecheck.h
@@ -41,6 +41,7 @@ signals:
void updateAvailable(QString latestVersion, QUrl link);
void upToDate();
void updateCheckFailed();
+ void versionIsUnstable();
private slots:
void handleResponse(QNetworkReply* reply);
diff --git a/src/widget/form/settings/aboutform.cpp b/src/widget/form/settings/aboutform.cpp
index 51540c8d6..2167ad5b0 100644
--- a/src/widget/form/settings/aboutform.cpp
+++ b/src/widget/form/settings/aboutform.cpp
@@ -62,6 +62,9 @@ AboutForm::AboutForm(UpdateCheck* updateCheck)
{
bodyUI->setupUi(this);
+ bodyUI->unstableVersion->setVisible(false);
+ connect(updateCheck, &UpdateCheck::versionIsUnstable, this, &AboutForm::onUnstableVersion);
+
// block all child signals during initialization
const RecursiveSignalBlocker signalBlocker(this);
@@ -187,6 +190,11 @@ void AboutForm::reloadTheme()
replaceVersions();
}
+void AboutForm::onUnstableVersion()
+{
+ bodyUI->unstableVersion->setVisible(true);
+}
+
/**
* @brief Creates hyperlink with specific style.
* @param path The URL of the page the link goes to.
diff --git a/src/widget/form/settings/aboutform.h b/src/widget/form/settings/aboutform.h
index 9a884cb34..a5976fd6c 100644
--- a/src/widget/form/settings/aboutform.h
+++ b/src/widget/form/settings/aboutform.h
@@ -48,6 +48,7 @@ public slots:
void onUpToDate();
void onUpdateCheckFailed();
void reloadTheme() override;
+ void onUnstableVersion();
private:
void retranslateUi();
diff --git a/src/widget/form/settings/aboutsettings.ui b/src/widget/form/settings/aboutsettings.ui
index 99b40c5ed..d6564d8ce 100644
--- a/src/widget/form/settings/aboutsettings.ui
+++ b/src/widget/form/settings/aboutsettings.ui
@@ -30,8 +30,8 @@
0
0
- 506
- 550
+ 496
+ 599
@@ -53,7 +53,7 @@
Version
- -
+
-
@@ -83,7 +83,7 @@
- -
+
-
@@ -98,7 +98,7 @@
- -
+
-
@@ -122,7 +122,7 @@
- -
+
-
@@ -149,7 +149,7 @@
- -
+
-
@@ -197,7 +197,10 @@
- true
+ false
+
+
+ QFrame::StyledPanel
qTox is up to date ✓
@@ -230,6 +233,22 @@
+ -
+
+
+
+
+
+ QFrame::NoFrame
+
+
+ Warning! Currently running qTox is unstable.
+
+
+ Qt::AlignCenter
+
+
+
diff --git a/src/widget/style.cpp b/src/widget/style.cpp
index f902002f0..e0ad15d8c 100644
--- a/src/widget/style.cpp
+++ b/src/widget/style.cpp
@@ -147,6 +147,7 @@ static const QMap aliasColors = {
{Style::GroundExtra, "groundExtra"},
{Style::GroundBase, "groundBase"},
{Style::Orange, "orange"},
+ {Style::Yellow, "yellow"},
{Style::ThemeDark, "themeDark"},
{Style::ThemeMediumDark, "themeMediumDark"},
{Style::ThemeMedium, "themeMedium"},
@@ -417,6 +418,7 @@ void Style::initDictColor()
{"@groundExtra", Style::getColor(Style::GroundExtra).name()},
{"@groundBase", Style::getColor(Style::GroundBase).name()},
{"@orange", Style::getColor(Style::Orange).name()},
+ {"@yellow", Style::getColor(Style::Yellow).name()},
{"@action", Style::getColor(Style::Action).name()},
{"@link", Style::getColor(Style::Link).name()},
{"@searchHighlighted", Style::getColor(Style::SearchHighlighted).name()},
diff --git a/src/widget/style.h b/src/widget/style.h
index 5a2974f01..7653980af 100644
--- a/src/widget/style.h
+++ b/src/widget/style.h
@@ -40,6 +40,7 @@ public:
GroundExtra,
GroundBase,
Orange,
+ Yellow,
ThemeDark,
ThemeMediumDark,
ThemeMedium,
diff --git a/themes/dark/palette.ini b/themes/dark/palette.ini
index 719d17783..5c077caf4 100644
--- a/themes/dark/palette.ini
+++ b/themes/dark/palette.ini
@@ -9,6 +9,7 @@ statusActive="#d1d1d1"
groundExtra="#d1d1d1"
groundBase="#201f1f"
orange="#713400"
+yellow="#adab00"
themeDark="#1c1c1c"
themeMediumDark="#2a2a2a"
themeMedium="#100f0f"
@@ -16,4 +17,4 @@ themeLight="#201f1f"
action="#546eff"
link="#d292ff"
searchHighlighted="#7e2a00"
-selectText = "#515151"
\ No newline at end of file
+selectText = "#515151"
diff --git a/themes/dark/window/general.css b/themes/dark/window/general.css
index 32ce3045c..107f51505 100644
--- a/themes/dark/window/general.css
+++ b/themes/dark/window/general.css
@@ -21,13 +21,13 @@ QTabWidget
background-color: #100f0f;
}
-QTabBar::tab:selected
+QTabBar::tab:selected
{
background: #100f0f;
color: @mainText;
}
-QTabBar::tab:!selected
+QTabBar::tab:!selected
{
background: #444242;
color: #8e8e8e;
@@ -302,3 +302,9 @@ QSplitter:handle
color: @groundBase;
background-color: @groundBase;
}
+
+QLabel#unstableVersion
+{
+ color: black;
+ background-color: @yellow;
+}
diff --git a/themes/default/palette.ini b/themes/default/palette.ini
index 8d7171caf..aeeaaf778 100644
--- a/themes/default/palette.ini
+++ b/themes/default/palette.ini
@@ -9,6 +9,7 @@ statusActive="#414141"
groundExtra="#d1d1d1"
groundBase="#ffffff"
orange="#ff7700"
+yellow="#9c9100"
themeDark="#1c1c1c"
themeMediumDark="#2a2a2a"
themeMedium="#414141"
@@ -16,4 +17,4 @@ themeLight="#4e4e4e"
action="#1818FF"
link="#0000ff"
searchHighlighted="#ff7626"
-selectText = "#9edeff"
\ No newline at end of file
+selectText = "#9edeff"
diff --git a/themes/default/window/general.css b/themes/default/window/general.css
index 11c375d40..70efde9e6 100644
--- a/themes/default/window/general.css
+++ b/themes/default/window/general.css
@@ -21,13 +21,13 @@ QTabWidget
background-color: white;
}
-QTabBar::tab:selected
+QTabBar::tab:selected
{
background: #2d3136;
color: #f1f1f1;
}
-QTabBar::tab:!selected
+QTabBar::tab:!selected
{
background: #d0d1d1;
color: #5e5e5e;
@@ -277,3 +277,9 @@ QSplitter:handle
color: white;
background-color: white;
}
+
+QLabel#unstableVersion
+{
+ color: @mainText;
+ background-color: @yellow;
+}