Browse Source

Updated game button style

Ivan Arkhipov 3 years ago
parent
commit
4bb8b4c551

+ 1 - 1
src/Legacy/widgets/gamesettings.cpp

@@ -80,7 +80,7 @@ void GameSettings::on_lotro_base_language_combobox_currentIndexChanged(int index
     Settings::setValue("Lotro/original_locale", value);
 
     QMetaObject::invokeMethod(&PatchInstaller::instance(), &PatchInstaller::deinit, Qt::QueuedConnection);
-    QMetaObject::invokeMethod(&PatchInstaller::instance(), &PatchInstaller::init, Qt::QueuedConnection);
+    QMetaObject::invokeMethod(&LegacyApplication::instance(), &LegacyApplication::InitModules, Qt::DirectConnection);
 }
 
 

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

@@ -126,7 +126,7 @@ void StatusWidget::onErrorStatusChanged(AppErrorStatus status)
     QString init_error_type_message;
 
     if (status == E_NO_ERRORS) {
-        setToolTipMessage("Запуск прошёл успешно!", E_ERROR);
+        setToolTipMessage("Инициализация Наследия прошла успешно!", E_ERROR);
         ui->news_list->updateNewsWidget();
         ui->server_status_widget->updateServerStatus();
         ui->weekly_code_widget->updateWeeklyCodeWidget();
@@ -375,16 +375,20 @@ void StatusWidget::updateButtonStatus() {
     if (_need_to_update) {
         setToolTipMessage("Доступна новая версия русификации. Нажмите \"Обновить\", чтобы начать загрузку.", ToolTipState::E_INFO);
         ui->game_button->setText("ОБНОВИТЬ");
+        ui->game_button->setStyleSheet("QPushButton#game_button { \n	color: white;\n	border-image: url(:/buttons/button_big_yellow.png);\n}\n\nQPushButton#game_button:hover {\n	color: white;\n	border-image: url(:/buttons/button_big_yellow_over.png);\n}\n\nQPushButton#game_button:pressed {\n	color: white;\n	border-image: url(:/buttons/button_big_yellow_pressed.png);\n}\n\nQPushButton#game_button:disabled {\n	color: white;\n	border-image: url(:/buttons/button_big_disabled.png);\n}\n");
     } else {
         unsetToolTipMessage(ToolTipState::E_INFO);
         ui->game_button->setText("ИГРАТЬ");
+        ui->game_button->setStyleSheet("QPushButton#game_button { \n	color: white;\n	border-image: url(:/buttons/button_big_normal.png);\n}\n\nQPushButton#game_button:hover {\n	color: white;\n	border-image: url(:/buttons/button_big_over.png);\n}\n\nQPushButton#game_button:pressed {\n	color: white;\n	border-image: url(:/buttons/button_big_pressed.png);\n}\n\nQPushButton#game_button:disabled {\n	color: white;\n	border-image: url(:/buttons/button_big_disabled.png);\n}\n");
     }
 
     if (_need_to_install_patches) {
         setToolTipMessage("Нажмите \"Установить\", чтобы начать процесс русификации.", ToolTipState::E_INFO);
         ui->game_button->setText("установить");
+        ui->game_button->setStyleSheet("QPushButton#game_button { \n	color: white;\n	border-image: url(:/buttons/button_big_yellow.png);\n}\n\nQPushButton#game_button:hover {\n	color: white;\n	border-image: url(:/buttons/button_big_yellow_over.png);\n}\n\nQPushButton#game_button:pressed {\n	color: white;\n	border-image: url(:/buttons/button_big_yellow_pressed.png);\n}\n\nQPushButton#game_button:disabled {\n	color: white;\n	border-image: url(:/buttons/button_big_disabled.png);\n}\n");
     } else {
         unsetToolTipMessage(ToolTipState::E_INFO);
         ui->game_button->setText("ИГРАТЬ");
+        ui->game_button->setStyleSheet("QPushButton#game_button { \n	color: white;\n	border-image: url(:/buttons/button_big_normal.png);\n}\n\nQPushButton#game_button:hover {\n	color: white;\n	border-image: url(:/buttons/button_big_over.png);\n}\n\nQPushButton#game_button:pressed {\n	color: white;\n	border-image: url(:/buttons/button_big_pressed.png);\n}\n\nQPushButton#game_button:disabled {\n	color: white;\n	border-image: url(:/buttons/button_big_disabled.png);\n}\n");
     }
 }

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

@@ -147,10 +147,10 @@ QScrollBar:vertical {
   <widget class="QPushButton" name="game_button">
    <property name="geometry">
     <rect>
-     <x>819</x>
-     <y>460</y>
-     <width>151</width>
-     <height>51</height>
+     <x>805</x>
+     <y>462</y>
+     <width>170</width>
+     <height>53</height>
     </rect>
    </property>
    <property name="sizePolicy">