diff --git a/gui/widgets/ServerStatus.cpp b/gui/widgets/ServerStatus.cpp index 10ed79fb..3b02fd24 100644 --- a/gui/widgets/ServerStatus.cpp +++ b/gui/widgets/ServerStatus.cpp @@ -17,6 +17,7 @@ ServerStatus::ServerStatus(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, layout = new QHBoxLayout(this); layout->setContentsMargins(0, 0, 0, 0); goodIcon = QIcon::fromTheme("status-good"); + yellowIcon = QIcon::fromTheme("status-yellow"); badIcon = QIcon::fromTheme("status-bad"); addStatus("minecraft.net", tr("Web")); @@ -78,32 +79,44 @@ void ServerStatus::addStatus(QString key, QString name) } } -void ServerStatus::setStatus(QString key, bool value) +void ServerStatus::setStatus(QString key, int value) { if (!serverLabels.contains(key)) return; IconLabel *label = serverLabels[key]; - label->setIcon(value ? goodIcon : badIcon); + switch(value) + { + case 0: + label->setIcon(goodIcon); + break; + case 1: + label->setIcon(yellowIcon); + break; + default: + case 2: + label->setIcon(badIcon); + break; + } } void ServerStatus::StatusChanged(const QMap statusEntries) { - auto convertStatus = [&](QString status)->bool + auto convertStatus = [&](QString status)->int { if (status == "green") - return true; + return 0; else if (status == "yellow") - return false; + return 1; else if (status == "red") - return false; - return false; + return 2; + return 2; } ; auto iter = statusEntries.begin(); while (iter != statusEntries.end()) { QString key = iter.key(); - bool value = convertStatus(iter.value()); + auto value = convertStatus(iter.value()); setStatus(key, value); iter++; } diff --git a/gui/widgets/ServerStatus.h b/gui/widgets/ServerStatus.h index 2244031b..1c6ae428 100644 --- a/gui/widgets/ServerStatus.h +++ b/gui/widgets/ServerStatus.h @@ -24,11 +24,12 @@ public slots: private: /* methods */ void addLine(); void addStatus(QString key, QString name); - void setStatus(QString key, bool value); + void setStatus(QString key, int value); private: /* data */ QHBoxLayout * layout = nullptr; QToolButton *m_statusRefresh = nullptr; QMap serverLabels; QIcon goodIcon; + QIcon yellowIcon; QIcon badIcon; }; diff --git a/resources/OSX/OSX.qrc b/resources/OSX/OSX.qrc index 24e1a0bf..20c71eb8 100644 --- a/resources/OSX/OSX.qrc +++ b/resources/OSX/OSX.qrc @@ -29,6 +29,7 @@ scalable/settings.svg scalable/status-bad.svg scalable/status-good.svg + scalable/status-yellow.svg scalable/viewfolder.svg diff --git a/resources/OSX/scalable/news.svg b/resources/OSX/scalable/news.svg index bd9a3f0b..b8ce3cd1 100644 --- a/resources/OSX/scalable/news.svg +++ b/resources/OSX/scalable/news.svg @@ -2,13 +2,15 @@ - + viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve"> + - - - + + + + diff --git a/resources/OSX/scalable/status-bad.svg b/resources/OSX/scalable/status-bad.svg index 3449fea3..add7a6f7 100644 --- a/resources/OSX/scalable/status-bad.svg +++ b/resources/OSX/scalable/status-bad.svg @@ -1,103 +1,11 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/resources/OSX/scalable/status-good.svg b/resources/OSX/scalable/status-good.svg index a5bf5c0b..f10da757 100644 --- a/resources/OSX/scalable/status-good.svg +++ b/resources/OSX/scalable/status-good.svg @@ -1,114 +1,19 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/resources/OSX/scalable/status-yellow.svg b/resources/OSX/scalable/status-yellow.svg new file mode 100644 index 00000000..fba697bc --- /dev/null +++ b/resources/OSX/scalable/status-yellow.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/resources/iOS/iOS.qrc b/resources/iOS/iOS.qrc index 6bfcef6d..eb625d0b 100644 --- a/resources/iOS/iOS.qrc +++ b/resources/iOS/iOS.qrc @@ -29,6 +29,7 @@ scalable/settings.svg scalable/status-bad.svg scalable/status-good.svg + scalable/status-yellow.svg scalable/viewfolder.svg diff --git a/resources/iOS/scalable/news.svg b/resources/iOS/scalable/news.svg index 79b62626..d3c010bb 100644 --- a/resources/iOS/scalable/news.svg +++ b/resources/iOS/scalable/news.svg @@ -2,14 +2,13 @@ - - - - + viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve"> + + + + + diff --git a/resources/iOS/scalable/status-bad.svg b/resources/iOS/scalable/status-bad.svg index 3449fea3..4019c8da 100644 --- a/resources/iOS/scalable/status-bad.svg +++ b/resources/iOS/scalable/status-bad.svg @@ -1,103 +1,10 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - + + + + + diff --git a/resources/iOS/scalable/status-good.svg b/resources/iOS/scalable/status-good.svg index a5bf5c0b..e1859113 100644 --- a/resources/iOS/scalable/status-good.svg +++ b/resources/iOS/scalable/status-good.svg @@ -1,114 +1,18 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/resources/iOS/scalable/status-yellow.svg b/resources/iOS/scalable/status-yellow.svg new file mode 100644 index 00000000..d8a28e23 --- /dev/null +++ b/resources/iOS/scalable/status-yellow.svg @@ -0,0 +1,56 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/resources/multimc/16x16/status-yellow.png b/resources/multimc/16x16/status-yellow.png new file mode 100644 index 00000000..b25375d1 Binary files /dev/null and b/resources/multimc/16x16/status-yellow.png differ diff --git a/resources/multimc/22x22/status-yellow.png b/resources/multimc/22x22/status-yellow.png new file mode 100644 index 00000000..481eb7f3 Binary files /dev/null and b/resources/multimc/22x22/status-yellow.png differ diff --git a/resources/multimc/24x24/status-yellow.png b/resources/multimc/24x24/status-yellow.png new file mode 100644 index 00000000..dd5fde67 Binary files /dev/null and b/resources/multimc/24x24/status-yellow.png differ diff --git a/resources/multimc/32x32/status-yellow.png b/resources/multimc/32x32/status-yellow.png new file mode 100644 index 00000000..42c68552 Binary files /dev/null and b/resources/multimc/32x32/status-yellow.png differ diff --git a/resources/multimc/48x48/status-yellow.png b/resources/multimc/48x48/status-yellow.png new file mode 100644 index 00000000..4f3b11d6 Binary files /dev/null and b/resources/multimc/48x48/status-yellow.png differ diff --git a/resources/multimc/64x64/status-yellow.png b/resources/multimc/64x64/status-yellow.png new file mode 100644 index 00000000..3d54d320 Binary files /dev/null and b/resources/multimc/64x64/status-yellow.png differ diff --git a/resources/multimc/multimc.qrc b/resources/multimc/multimc.qrc index 1713c50f..d02d0e0e 100644 --- a/resources/multimc/multimc.qrc +++ b/resources/multimc/multimc.qrc @@ -13,7 +13,7 @@ scalable/proxy.svg - + scalable/java.svg @@ -38,7 +38,7 @@ 32x32/bug.png 48x48/bug.png 64x64/bug.png - + 16x16/screenshots.png @@ -63,7 +63,7 @@ 32x32/cat.png 48x48/cat.png 64x64/cat.png - + scalable/centralmods.svg 16x16/centralmods.png @@ -86,7 +86,7 @@ 32x32/copy.png 48x48/copy.png 64x64/copy.png - + 16x16/help.png 22x22/help.png @@ -124,13 +124,21 @@ 32x32/status-good.png 48x48/status-good.png 64x64/status-good.png - + + + 16x16/status-yellow.png + 24x24/status-yellow.png + 22x22/status-yellow.png + 32x32/status-yellow.png + 48x48/status-yellow.png + 64x64/status-yellow.png + 16x16/loadermods.png 24x24/loadermods.png 32x32/loadermods.png 64x64/loadermods.png - + 16x16/jarmods.png 24x24/jarmods.png @@ -191,7 +199,7 @@ 32x32/log.png 48x48/log.png 64x64/log.png - + scalable/screenshot-placeholder.svg diff --git a/resources/multimc/scalable/status-yellow.svg b/resources/multimc/scalable/status-yellow.svg new file mode 100644 index 00000000..140e6082 --- /dev/null +++ b/resources/multimc/scalable/status-yellow.svg @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/resources/pe_blue/pe_blue.qrc b/resources/pe_blue/pe_blue.qrc index 5fdfd317..a4525d2e 100644 --- a/resources/pe_blue/pe_blue.qrc +++ b/resources/pe_blue/pe_blue.qrc @@ -29,6 +29,7 @@ scalable/settings.svg scalable/status-bad.svg scalable/status-good.svg + scalable/status-yellow.svg scalable/viewfolder.svg diff --git a/resources/pe_blue/scalable/status-bad.svg b/resources/pe_blue/scalable/status-bad.svg index 3449fea3..4a48b5d8 100644 --- a/resources/pe_blue/scalable/status-bad.svg +++ b/resources/pe_blue/scalable/status-bad.svg @@ -1,103 +1,10 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/resources/pe_blue/scalable/status-good.svg b/resources/pe_blue/scalable/status-good.svg index a5bf5c0b..4cfa56f0 100644 --- a/resources/pe_blue/scalable/status-good.svg +++ b/resources/pe_blue/scalable/status-good.svg @@ -1,114 +1,15 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/resources/pe_blue/scalable/status-yellow.svg b/resources/pe_blue/scalable/status-yellow.svg new file mode 100644 index 00000000..0551fed2 --- /dev/null +++ b/resources/pe_blue/scalable/status-yellow.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/resources/pe_colored/pe_colored.qrc b/resources/pe_colored/pe_colored.qrc index f89cf63f..7de8d5ab 100644 --- a/resources/pe_colored/pe_colored.qrc +++ b/resources/pe_colored/pe_colored.qrc @@ -29,6 +29,7 @@ scalable/settings.svg scalable/status-bad.svg scalable/status-good.svg + scalable/status-yellow.svg scalable/viewfolder.svg diff --git a/resources/pe_colored/scalable/status-bad.svg b/resources/pe_colored/scalable/status-bad.svg index 3449fea3..bc42c248 100644 --- a/resources/pe_colored/scalable/status-bad.svg +++ b/resources/pe_colored/scalable/status-bad.svg @@ -1,103 +1,10 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/resources/pe_colored/scalable/status-good.svg b/resources/pe_colored/scalable/status-good.svg index a5bf5c0b..4cfa56f0 100644 --- a/resources/pe_colored/scalable/status-good.svg +++ b/resources/pe_colored/scalable/status-good.svg @@ -1,114 +1,15 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/resources/pe_colored/scalable/status-yellow.svg b/resources/pe_colored/scalable/status-yellow.svg new file mode 100644 index 00000000..0551fed2 --- /dev/null +++ b/resources/pe_colored/scalable/status-yellow.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/resources/pe_dark/pe_dark.qrc b/resources/pe_dark/pe_dark.qrc index d5c621bc..cafc2559 100644 --- a/resources/pe_dark/pe_dark.qrc +++ b/resources/pe_dark/pe_dark.qrc @@ -29,6 +29,7 @@ scalable/settings.svg scalable/status-bad.svg scalable/status-good.svg + scalable/status-yellow.svg scalable/viewfolder.svg diff --git a/resources/pe_dark/scalable/status-bad.svg b/resources/pe_dark/scalable/status-bad.svg index 3449fea3..f455965a 100644 --- a/resources/pe_dark/scalable/status-bad.svg +++ b/resources/pe_dark/scalable/status-bad.svg @@ -1,103 +1,10 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/resources/pe_dark/scalable/status-good.svg b/resources/pe_dark/scalable/status-good.svg index a5bf5c0b..4ba91f2d 100644 --- a/resources/pe_dark/scalable/status-good.svg +++ b/resources/pe_dark/scalable/status-good.svg @@ -1,114 +1,12 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - + + + + + + + + diff --git a/resources/pe_dark/scalable/status-yellow.svg b/resources/pe_dark/scalable/status-yellow.svg new file mode 100644 index 00000000..69133817 --- /dev/null +++ b/resources/pe_dark/scalable/status-yellow.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/resources/pe_light/pe_light.qrc b/resources/pe_light/pe_light.qrc index 11d74c8f..53d0890b 100644 --- a/resources/pe_light/pe_light.qrc +++ b/resources/pe_light/pe_light.qrc @@ -29,6 +29,7 @@ scalable/settings.svg scalable/status-bad.svg scalable/status-good.svg + scalable/status-yellow.svg scalable/viewfolder.svg diff --git a/resources/pe_light/scalable/news.svg b/resources/pe_light/scalable/news.svg index 84979dcb..6f184afc 100644 --- a/resources/pe_light/scalable/news.svg +++ b/resources/pe_light/scalable/news.svg @@ -3,11 +3,10 @@ - - + diff --git a/resources/pe_light/scalable/status-bad.svg b/resources/pe_light/scalable/status-bad.svg index 3449fea3..2c24970c 100644 --- a/resources/pe_light/scalable/status-bad.svg +++ b/resources/pe_light/scalable/status-bad.svg @@ -1,103 +1,10 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/resources/pe_light/scalable/status-good.svg b/resources/pe_light/scalable/status-good.svg index a5bf5c0b..bf9a4174 100644 --- a/resources/pe_light/scalable/status-good.svg +++ b/resources/pe_light/scalable/status-good.svg @@ -1,114 +1,12 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - + + + + + + + + diff --git a/resources/pe_light/scalable/status-yellow.svg b/resources/pe_light/scalable/status-yellow.svg new file mode 100644 index 00000000..f7d2236b --- /dev/null +++ b/resources/pe_light/scalable/status-yellow.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + +