Browse Source

Finished adding tooltip for servers status

Ivan Arkhipov 5 years ago
parent
commit
202f710f13

+ 1 - 0
src/Legacy/constants.h

@@ -11,4 +11,5 @@ const double default_window_height = 648;
 extern double window_height;
 extern double window_width;
 
+
 #endif // CONSTANTS_H

+ 1 - 1
src/Legacy/fonts.cpp

@@ -39,7 +39,7 @@ int pixels_in_15_pt = 24;//14;
 int pixels_in_14_pt = 23;//14;
 int pixels_in_13_pt = 21;//14;
 int pixels_in_12_pt = 20;//14;
-int pixels_in_11_pt = 19;//13;
+int pixels_in_11_pt = 18;//13;
 int pixels_in_10_pt = 17;//12;
 int pixels_in_9_pt = 16;//11;
 int pixels_in_8_pt = 15;//9;

+ 1 - 1
src/Legacy/fonts.h

@@ -44,7 +44,7 @@ const double default_pixels_in_15_pt = 24;//14;
 const double default_pixels_in_14_pt = 23;//14;
 const double default_pixels_in_13_pt = 21;//14;
 const double default_pixels_in_12_pt = 20;//14;
-const double default_pixels_in_11_pt = 19;//13;
+const double default_pixels_in_11_pt = 18;//13;
 const double default_pixels_in_10_pt = 17;//12;
 const double default_pixels_in_9_pt = 16;//11;
 const double default_pixels_in_8_pt = 14;//9;

+ 1 - 1
src/Legacy/models/patchdownloader.cpp

@@ -251,7 +251,7 @@ bool PatchDownloader::DownloadMissingPatches()
         qDebug() << "Patch" << patch.name << "is marked as" << app_settings->value("PatchDatabasesDownload/" + patch.name, "Disabled");
 
         if (app_settings->value("PatchDatabasesDownload/" + patch.name, "Disabled").toString() != "Enabled") {
-            emit changePatchStatus(patch.name, "Отключены");
+            emit changePatchStatus(patch.name, "Не выбраны для установки");
             continue;
         }
 

+ 8 - 8
src/Legacy/widgets/serverstatuswidget.cpp

@@ -107,9 +107,9 @@ void ServerStatusWidget::updateTechWorksMessage()
     if (tech_work_message_data.isEmpty()) {
         QString result;
         if (!servers_disabled) {
-            result = "<p style=\"color:#00aa00\">Сервера игры работают в штатном режиме.</p>";
+            result = "ИГРОВЫЕ СЕРВЕРЫ LOTRO РАБОТАЮТ В ШТАТНОМ РЕЖИМЕ";
         } else {
-            result = "<p style =\"color:#ff0000\">Сервера игры отключены.</p>";
+            result = "<p style =\"color:#ff0000\">СЕРВЕРЫ ИГРЫ ОТКЛЮЧЕНЫ</p>";
         }
         emit updateServersTooltip(result);
         tech_work_message_data = "";
@@ -122,16 +122,16 @@ void ServerStatusWidget::updateTechWorksMessage()
         return;
     }
 
-    QString time_beginning = list[0];
-    QString time_end = list[1];
-    QString day = list[2];
-    QString month = " " + list[3];
+    QString time_beginning = "<span style =\"font-family:Trajan Pro 3\">" + list[0] + "</span>";
+    QString time_end = "<span style =\"font-family:Trajan Pro 3\">" + list[1] + "</span>";
+    QString day = "<span style =\"font-family:Trajan Pro 3\">" + list[2] + "</span>";
+    QString month = QString(" " + list[3]).toUpper();
 
     QString result;
     if (!servers_disabled) {
-        result = "<p style=\"color:#ffff7f\">Запланирована профилактика игровых серверов " + day + month + " с " + time_beginning + " до " + time_end+ " (МСК).</p>";
+        result = "<p style=\"color:#ffff7f\">ПЛАНИРУЕТСЯ ОТКЛЮЧЕНИЕ СЕРВЕРОВ ИГРЫ " + day + month + " С " + time_beginning + " ДО " + time_end+ " (МСК).</p>";
     } else {
-        result = "<p style=\"color:#ff0000\">Сервера игры отключены. Ориентировочное время проф. работ: " + day + month + " с " + time_beginning + " до " + time_end + " (МСК).</p>";
+        result = "<p style=\"color:#ff0000\">СЕРВЕРЫ ИГРЫ ОТКЛЮЧЕНЫ<br>ВРЕМЯ ПРОФ.РАБОТ: " + day + month + " С " + time_beginning + " ДО " + time_end + " (МСК).</p>";
     }
 
     tech_work_message_data = "";

+ 0 - 1
src/Legacy/widgets/settingswidget.cpp

@@ -28,7 +28,6 @@ SettingsWidget::SettingsWidget(QSettings* settings, PatchDownloader* patch_downl
     connect(patch_downloader, &PatchDownloader::checkForUpdatesFinished, this, &SettingsWidget::handleCheckForUpdatesFinished, Qt::QueuedConnection);
     connect(lotro_manager, &LotroDatManager::processStarted, this, &SettingsWidget::handleLotroManagerStarted);
     connect(lotro_manager, &LotroDatManager::processFinished, this, &SettingsWidget::handleLotroManagerFinished);
-
 }
 
 SettingsWidget::~SettingsWidget()

+ 5 - 5
src/Legacy/widgets/statuswidget.cpp

@@ -55,7 +55,7 @@ StatusWidget::StatusWidget(QSettings* settings, PatchDownloader* patch_downloade
     ui->server_status_tooltip->setGraphicsEffect(tooltip_effects[ui->server_status_tooltip->objectName()]);
 
     foreach (QPropertyAnimation* animation, tooltip_animations) {
-        animation->setDuration(250);
+        animation->setDuration(350);
         animation->setStartValue(0);
         animation->setEndValue(1);
         animation->setDirection(QAbstractAnimation::Forward);
@@ -98,10 +98,10 @@ void StatusWidget::updateFontsSizes()
     ui->videos_label->setFont(crimson_11pt);
     ui->videos_status->setFont(crimson_11pt);
 
-    ui->news_tooltip->setFont(garamond_10pt);
-    ui->weekly_code_tooltip_1->setFont(garamond_10pt);
-    ui->weekly_code_tooltip_2->setFont(garamond_10pt);
-    ui->server_status_tooltip->setFont(crimson_14pt);
+    ui->news_tooltip->setFont(garamond_11pt);
+    ui->weekly_code_tooltip_1->setFont(garamond_11pt);
+    ui->weekly_code_tooltip_2->setFont(garamond_11pt);
+    ui->server_status_tooltip->setFont(garamond_11pt);
 }
 
 void StatusWidget::resizeEvent(QResizeEvent *event)

+ 1 - 1
src/Legacy/widgets/statuswidget.ui

@@ -472,7 +472,7 @@ border-image: url(:/characters/galadriel_with_text.png);
      <string notr="true"/>
     </property>
     <property name="text">
-     <string>Игровые сервера работают в штатном режиме</string>
+     <string>Получение информации об игровых серверах...</string>
     </property>
     <property name="alignment">
      <set>Qt::AlignCenter</set>