Browse Source

UI improvements

Ivan Arkhipov 4 năm trước cách đây
mục cha
commit
5456aaa1e9

+ 6 - 7
src/Legacy/widgets/aboutwidget.cpp

@@ -28,10 +28,7 @@ void AboutWidget::updateFontsSizes()
     ui->goto_donate->setFont(trajan_8pt);
     ui->goto_forum->setFont(trajan_8pt);
     ui->goto_site->setFont(trajan_8pt);
-
-    ui->powered_by->setFont(trajan_10pt);
-    ui->server_size->setFont(trajan_8pt);
-    ui->client_side->setFont(trajan_8pt);
+    ui->goto_discord->setFont(trajan_8pt);
 }
 
 void AboutWidget::resizeEvent(QResizeEvent *)
@@ -44,9 +41,6 @@ void AboutWidget::resizeEvent(QResizeEvent *)
     ui->widget_name_label->move(QPoint(45, 33)* coefficient);
     ui->widget_name_label->resize(QSize(180, 21) * coefficient);
 
-    ui->endevir_icon->setMinimumSize({int(50.0 * coefficient), int(50.0 * coefficient)});
-    ui->coder_icon->setMinimumSize({int(50.0 * coefficient), int(50.0 * coefficient)});
-
     updateFontsSizes();
 }
 
@@ -69,3 +63,8 @@ void AboutWidget::on_goto_donate_clicked()
 {
     QDesktopServices::openUrl(Settings::getValue("Network/donate_url").toUrl());
 }
+
+void AboutWidget::on_goto_discord_clicked()
+{
+    QDesktopServices::openUrl(Settings::getValue("Network/discord_url").toUrl());
+}

+ 2 - 0
src/Legacy/widgets/aboutwidget.h

@@ -32,6 +32,8 @@ private slots:
 
     void on_goto_donate_clicked();
 
+    void on_goto_discord_clicked();
+
 private:
     Ui::AboutWidget *ui;
 };

+ 42 - 126
src/Legacy/widgets/aboutwidget.ui

@@ -58,8 +58,8 @@
     <property name="bottomMargin">
      <number>0</number>
     </property>
-    <item row="0" column="0" colspan="3">
-     <widget class="QPushButton" name="goto_site">
+    <item row="5" column="0" colspan="2">
+     <widget class="QPushButton" name="goto_bugs">
       <property name="font">
        <font>
         <family>Trajan Pro 3</family>
@@ -86,12 +86,25 @@ border: 1px solid qlineargradient(spread:reflect, x1:1, y1:1, x2:0, y2:1, stop:0
 }</string>
       </property>
       <property name="text">
-       <string>Официальный сайт</string>
+       <string>Сообщить об ошибке</string>
       </property>
      </widget>
     </item>
-    <item row="2" column="0" colspan="3">
-     <widget class="QPushButton" name="goto_bugs">
+    <item row="7" column="0" colspan="2">
+     <spacer name="verticalSpacer">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>240</width>
+        <height>136</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item row="1" column="0" colspan="2">
+     <widget class="QPushButton" name="goto_forum">
       <property name="font">
        <font>
         <family>Trajan Pro 3</family>
@@ -118,12 +131,12 @@ border: 1px solid qlineargradient(spread:reflect, x1:1, y1:1, x2:0, y2:1, stop:0
 }</string>
       </property>
       <property name="text">
-       <string>Сообщить об ошибке</string>
+       <string>Форум сообщества</string>
       </property>
      </widget>
     </item>
-    <item row="1" column="0" colspan="3">
-     <widget class="QPushButton" name="goto_forum">
+    <item row="0" column="0" colspan="2">
+     <widget class="QPushButton" name="goto_site">
       <property name="font">
        <font>
         <family>Trajan Pro 3</family>
@@ -150,11 +163,11 @@ border: 1px solid qlineargradient(spread:reflect, x1:1, y1:1, x2:0, y2:1, stop:0
 }</string>
       </property>
       <property name="text">
-       <string>Форум</string>
+       <string>Cайт проекта</string>
       </property>
      </widget>
     </item>
-    <item row="3" column="0" colspan="3">
+    <item row="6" column="0" colspan="2">
      <widget class="QPushButton" name="goto_donate">
       <property name="font">
        <font>
@@ -186,132 +199,35 @@ border: 1px solid qlineargradient(spread:reflect, x1:1, y1:1, x2:0, y2:1, stop:0
       </property>
      </widget>
     </item>
-    <item row="4" column="0" colspan="3">
-     <spacer name="verticalSpacer">
-      <property name="orientation">
-       <enum>Qt::Vertical</enum>
-      </property>
-      <property name="sizeHint" stdset="0">
-       <size>
-        <width>240</width>
-        <height>136</height>
-       </size>
-      </property>
-     </spacer>
-    </item>
-    <item row="6" column="0" colspan="2">
-     <widget class="QLabel" name="client_side">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-        <pointsize>7</pointsize>
-       </font>
-      </property>
-      <property name="text">
-       <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Клиентская часть: &lt;br/&gt;&lt;span style=&quot; font-family:'Aniron'; color:#00ff00;&quot;&gt;Endevir&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-      <property name="wordWrap">
-       <bool>true</bool>
-      </property>
-     </widget>
-    </item>
-    <item row="5" column="0" colspan="3">
-     <widget class="QLabel" name="powered_by">
+    <item row="2" column="0" colspan="2">
+     <widget class="QPushButton" name="goto_discord">
       <property name="font">
        <font>
         <family>Trajan Pro 3</family>
-        <pointsize>9</pointsize>
-       </font>
-      </property>
-      <property name="text">
-       <string>Powered by:</string>
-      </property>
-      <property name="wordWrap">
-       <bool>true</bool>
-      </property>
-     </widget>
-    </item>
-    <item row="8" column="0" colspan="2">
-     <widget class="QLabel" name="server_size">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-        <pointsize>7</pointsize>
-       </font>
-      </property>
-      <property name="text">
-       <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Серверная часть: &lt;br/&gt;&lt;span style=&quot; font-family:'Aniron'; color:#00aaff;&quot;&gt;Coder&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-      <property name="wordWrap">
-       <bool>true</bool>
-      </property>
-     </widget>
-    </item>
-    <item row="8" column="2">
-     <widget class="QLabel" name="coder_icon">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="minimumSize">
-       <size>
-        <width>50</width>
-        <height>50</height>
-       </size>
-      </property>
-      <property name="font">
-       <font>
-        <family>AngryBirds</family>
-        <pointsize>7</pointsize>
+        <pointsize>8</pointsize>
        </font>
       </property>
-      <property name="styleSheet">
-       <string notr="true">border-image: url(:/characters/coder_av.png);</string>
-      </property>
-      <property name="text">
-       <string/>
-      </property>
-      <property name="wordWrap">
-       <bool>true</bool>
-      </property>
-     </widget>
-    </item>
-    <item row="6" column="2">
-     <widget class="QLabel" name="endevir_icon">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="minimumSize">
-       <size>
-        <width>50</width>
-        <height>50</height>
-       </size>
+      <property name="cursor">
+       <cursorShape>PointingHandCursor</cursorShape>
       </property>
-      <property name="font">
-       <font>
-        <family>Aniron</family>
-        <pointsize>7</pointsize>
-       </font>
+      <property name="autoFillBackground">
+       <bool>false</bool>
       </property>
       <property name="styleSheet">
-       <string notr="true">border-image: url(:/characters/endevir_av.jpg);</string>
+       <string notr="true">QPushButton {
+background-color:rgba(0,0,0,100);
+border-radius: 5px;
+border: 1px solid qlineargradient(spread:reflect, x1:1, y1:1, x2:0, y2:1, stop:0 rgba(33, 24, 12, 255), stop:0.5 rgba(126, 97, 61, 255), stop:1 rgba(33, 24, 1, 255));
+}
+ 
+QPushButton:pressed {
+background-color:rgba(0,0,0,20);
+border-radius: 5px;
+border: 1px solid qlineargradient(spread:reflect, x1:1, y1:1, x2:0, y2:1, stop:0 rgba(33, 24, 12, 255), stop:0.5 rgba(126, 97, 61, 255), stop:1 rgba(33, 24, 1, 255));
+}</string>
       </property>
       <property name="text">
-       <string/>
-      </property>
-      <property name="wordWrap">
-       <bool>true</bool>
+       <string>Discord-сервер сообщества</string>
       </property>
      </widget>
     </item>

+ 3 - 0
src/Legacy/widgets/statuswidget.cpp

@@ -23,6 +23,9 @@ StatusWidget::StatusWidget(QWidget *parent)
     last_statusbar_update_time_.start();
     ui->galadriel_tooltip_example->hide();
     ui->c_progress_bar->setProgress(100);
+    dynamic_cast<MainWindow*>(window())->getNewsWidget()->updateNewsWidget();
+    ui->server_status_widget->updateServerStatus();
+    ui->weekly_code_widget->updateWeeklyCodeWidget();
 
     connect(ui->weekly_code_widget, &WeeklyCodeWidget::showCompletedTooltip, this, [this](){setToolTipMessage("Еженедельный код скопирован в буфер обмена.", E_HINT);});
     connect(ui->weekly_code_widget, &WeeklyCodeWidget::showHelpTooltip, this, [this](){setToolTipMessage("Нажмите по еженедельному коду, чтобы скопировать его.", E_HINT);});

+ 6 - 0
src/Legacy/widgets/statuswidget.ui

@@ -54,6 +54,9 @@ color: white;
      <height>320</height>
     </rect>
    </property>
+   <property name="cursor">
+    <cursorShape>WhatsThisCursor</cursorShape>
+   </property>
   </widget>
   <widget class="WeeklyCodeWidget" name="weekly_code_widget" native="true">
    <property name="geometry">
@@ -95,6 +98,9 @@ color: white;
      <kerning>false</kerning>
     </font>
    </property>
+   <property name="cursor">
+    <cursorShape>PointingHandCursor</cursorShape>
+   </property>
    <property name="autoFillBackground">
     <bool>false</bool>
    </property>

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

@@ -15,7 +15,7 @@ TranslationComponents::TranslationComponents(QWidget *parent) :
 
     ui->texts_block_label->setTooltipParentWidget(parentWidget());
     ui->texts_block_label->raise();
-    ui->texts_block_label->setTooltipText("Перевод всех текстовых элементов в игре: названий, квестов, меню и т.д.");
+    ui->texts_block_label->setTooltipText("Перевод текстовых элементов в игре: названий, квестов, предметов, эмоций, интерфейса и т.д.");
     connect(ui->texts_block_switch, &SwitchButton::valueChanged, this, &TranslationComponents::onTextsChange);
 
     ui->graphics_block_label->setTooltipParentWidget(parentWidget());

+ 50 - 10
src/Legacy/widgets/translationcomponents.ui

@@ -59,18 +59,26 @@
       </property>
       <item>
        <widget class="TooltipButton" name="texts_block_label">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
         <property name="font">
          <font>
           <family>Crimson Text</family>
           <pointsize>12</pointsize>
          </font>
         </property>
+        <property name="cursor">
+         <cursorShape>WhatsThisCursor</cursorShape>
+        </property>
         <property name="autoFillBackground">
          <bool>false</bool>
         </property>
         <property name="styleSheet">
-         <string notr="true">border-bottom: 3px dotted #fff;
-</string>
+         <string notr="true"/>
         </property>
         <property name="frameShape">
          <enum>QFrame::NoFrame</enum>
@@ -132,18 +140,26 @@
       </property>
       <item>
        <widget class="TooltipButton" name="graphics_block_label">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
         <property name="font">
          <font>
           <family>Crimson Text</family>
           <pointsize>12</pointsize>
          </font>
         </property>
+        <property name="cursor">
+         <cursorShape>WhatsThisCursor</cursorShape>
+        </property>
         <property name="autoFillBackground">
          <bool>false</bool>
         </property>
         <property name="styleSheet">
-         <string notr="true">border-bottom: 3px dotted #fff;
-</string>
+         <string notr="true"/>
         </property>
         <property name="frameShape">
          <enum>QFrame::NoFrame</enum>
@@ -205,18 +221,26 @@
       </property>
       <item>
        <widget class="TooltipButton" name="audio_block_label">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
         <property name="font">
          <font>
           <family>Crimson Text</family>
           <pointsize>12</pointsize>
          </font>
         </property>
+        <property name="cursor">
+         <cursorShape>WhatsThisCursor</cursorShape>
+        </property>
         <property name="autoFillBackground">
          <bool>false</bool>
         </property>
         <property name="styleSheet">
-         <string notr="true">border-bottom: 3px dotted #fff;
-</string>
+         <string notr="true"/>
         </property>
         <property name="frameShape">
          <enum>QFrame::NoFrame</enum>
@@ -278,18 +302,26 @@
       </property>
       <item>
        <widget class="TooltipButton" name="loadscreens_block_label">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
         <property name="font">
          <font>
           <family>Crimson Text</family>
           <pointsize>12</pointsize>
          </font>
         </property>
+        <property name="cursor">
+         <cursorShape>WhatsThisCursor</cursorShape>
+        </property>
         <property name="autoFillBackground">
          <bool>false</bool>
         </property>
         <property name="styleSheet">
-         <string notr="true">border-bottom: 3px dotted #fff;
-</string>
+         <string notr="true"/>
         </property>
         <property name="frameShape">
          <enum>QFrame::NoFrame</enum>
@@ -351,18 +383,26 @@
       </property>
       <item>
        <widget class="TooltipButton" name="video_block_label">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
         <property name="font">
          <font>
           <family>Crimson Text</family>
           <pointsize>12</pointsize>
          </font>
         </property>
+        <property name="cursor">
+         <cursorShape>WhatsThisCursor</cursorShape>
+        </property>
         <property name="autoFillBackground">
          <bool>false</bool>
         </property>
         <property name="styleSheet">
-         <string notr="true">border-bottom: 3px dotted #fff;
-</string>
+         <string notr="true"/>
         </property>
         <property name="frameShape">
          <enum>QFrame::NoFrame</enum>