1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-20 20:23:03 +02:00

Added slightly better layout for "About" screen

This commit is contained in:
Ivan Savenko 2023-06-30 18:41:05 +03:00
parent d90fb7eb3f
commit eb06c5fa3f
7 changed files with 271 additions and 269 deletions

View File

@ -26,6 +26,7 @@ AboutProjectView::AboutProjectView(QWidget * parent)
ui->lineEditGameDir->setText(pathToQString(VCMIDirs::get().binaryPath())); ui->lineEditGameDir->setText(pathToQString(VCMIDirs::get().binaryPath()));
ui->lineEditTempDir->setText(pathToQString(VCMIDirs::get().userLogsPath())); ui->lineEditTempDir->setText(pathToQString(VCMIDirs::get().userLogsPath()));
ui->lineEditBuildVersion->setText(QString::fromStdString(GameConstants::VCMI_VERSION)); ui->lineEditBuildVersion->setText(QString::fromStdString(GameConstants::VCMI_VERSION));
ui->lineEditOperatingSystem->setText(QSysInfo::prettyProductName());
} }
void AboutProjectView::on_updatesButton_clicked() void AboutProjectView::on_updatesButton_clicked()

View File

@ -6,277 +6,260 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>745</width> <width>515</width>
<height>389</height> <height>394</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string/> <string/>
</property> </property>
<widget class="QPushButton" name="pushButtonSlack"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="geometry"> <item>
<rect> <spacer name="verticalSpacer_2">
<x>150</x> <property name="orientation">
<y>300</y> <enum>Qt::Vertical</enum>
<width>229</width> </property>
<height>23</height> <property name="sizeHint" stdset="0">
</rect> <size>
</property> <width>20</width>
<property name="text"> <height>40</height>
<string>VCMI on Slack</string> </size>
</property> </property>
</widget> </spacer>
<widget class="QPushButton" name="pushButtonDiscord"> </item>
<property name="geometry"> <item>
<rect> <layout class="QGridLayout" name="gridLayout_2">
<x>160</x> <item row="2" column="0">
<y>270</y> <widget class="QPushButton" name="pushButtonDiscord">
<width>229</width> <property name="text">
<height>23</height> <string>VCMI on Discord</string>
</rect> </property>
</property> </widget>
<property name="text"> </item>
<string>VCMI on Discord</string> <item row="1" column="0" colspan="2">
</property> <widget class="QLabel" name="labelLanguageSocial">
</widget> <property name="text">
<widget class="QPushButton" name="pushButtonGithub"> <string>Have a question? Found a bug? Want to help? Join us!</string>
<property name="geometry"> </property>
<rect> </widget>
<x>150</x> </item>
<y>340</y> <item row="4" column="0">
<width>229</width> <widget class="QPushButton" name="pushButtonGithub">
<height>23</height> <property name="text">
</rect> <string>VCMI on Github</string>
</property> </property>
<property name="text"> </widget>
<string>VCMI on Github</string> </item>
</property> <item row="0" column="0">
</widget> <widget class="QLabel" name="labelDataDirs_2">
<widget class="QLabel" name="labelLanguageSocial"> <property name="minimumSize">
<property name="geometry"> <size>
<rect> <width>200</width>
<x>160</x> <height>0</height>
<y>230</y> </size>
<width>331</width> </property>
<height>16</height> <property name="font">
</rect> <font>
</property> <weight>75</weight>
<property name="text"> <bold>true</bold>
<string>Have a question? Found a bug? Want to help? Join us!</string> </font>
</property> </property>
</widget> <property name="text">
<widget class="QLabel" name="labelGameDir"> <string>Our Community</string>
<property name="geometry"> </property>
<rect> </widget>
<x>97</x> </item>
<y>112</y> <item row="3" column="0">
<width>277</width> <widget class="QPushButton" name="pushButtonSlack">
<height>23</height> <property name="text">
</rect> <string>VCMI on Slack</string>
</property> </property>
<property name="text"> </widget>
<string>Game data directory</string> </item>
</property> </layout>
</widget> </item>
<widget class="QPushButton" name="openTempDir"> <item>
<property name="geometry"> <spacer name="verticalSpacer">
<rect> <property name="orientation">
<x>597</x> <enum>Qt::Vertical</enum>
<y>170</y> </property>
<width>92</width> <property name="sizeHint" stdset="0">
<height>23</height> <size>
</rect> <width>20</width>
</property> <height>40</height>
<property name="text"> </size>
<string>Open</string> </property>
</property> </spacer>
</widget> </item>
<widget class="QLabel" name="labelTempDir"> <item>
<property name="geometry"> <layout class="QGridLayout" name="gridLayout" columnstretch="2,4,1">
<rect> <item row="0" column="0">
<x>97</x> <widget class="QLabel" name="labelDataDirs_3">
<y>170</y> <property name="minimumSize">
<width>277</width> <size>
<height>23</height> <width>0</width>
</rect> <height>0</height>
</property> </size>
<property name="text"> </property>
<string>Log files directory</string> <property name="font">
</property> <font>
</widget> <weight>75</weight>
<widget class="QPushButton" name="openUserDataDir"> <bold>true</bold>
<property name="geometry"> </font>
<rect> </property>
<x>597</x> <property name="text">
<y>141</y> <string>Build Information</string>
<width>92</width> </property>
<height>23</height> </widget>
</rect> </item>
</property> <item row="1" column="1">
<property name="text"> <widget class="QLineEdit" name="lineEditBuildVersion">
<string>Open</string> <property name="text">
</property> <string notr="true"/>
</widget> </property>
<widget class="QLineEdit" name="lineEditUserDataDir"> <property name="readOnly">
<property name="enabled"> <bool>true</bool>
<bool>false</bool> </property>
</property> </widget>
<property name="geometry"> </item>
<rect> <item row="5" column="0">
<x>380</x> <widget class="QLabel" name="labelUserDataDir">
<y>141</y> <property name="text">
<width>211</width> <string>User data directory</string>
<height>23</height> </property>
</rect> </widget>
</property> </item>
<property name="text"> <item row="5" column="2">
<string notr="true">/home/user/.vcmi</string> <widget class="QPushButton" name="openUserDataDir">
</property> <property name="text">
<property name="readOnly"> <string>Open</string>
<bool>true</bool> </property>
</property> </widget>
</widget> </item>
<widget class="QPushButton" name="openGameDataDir"> <item row="6" column="2">
<property name="geometry"> <widget class="QPushButton" name="openTempDir">
<rect> <property name="text">
<x>597</x> <string>Open</string>
<y>112</y> </property>
<width>92</width> </widget>
<height>23</height> </item>
</rect> <item row="1" column="2">
</property> <widget class="QPushButton" name="updatesButton">
<property name="text"> <property name="text">
<string>Open</string> <string>Check for updates</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" name="lineEditGameDir"> </item>
<property name="enabled"> <item row="5" column="1">
<bool>false</bool> <widget class="QLineEdit" name="lineEditUserDataDir">
</property> <property name="enabled">
<property name="geometry"> <bool>true</bool>
<rect> </property>
<x>380</x> <property name="text">
<y>112</y> <string notr="true">/home/user/.vcmi</string>
<width>211</width> </property>
<height>23</height> <property name="readOnly">
</rect> <bool>true</bool>
</property> </property>
<property name="text"> </widget>
<string notr="true">/usr/share/vcmi</string> </item>
</property> <item row="1" column="0">
</widget> <widget class="QLabel" name="labelBuildVersionDesc">
<widget class="QLabel" name="labelUserDataDir"> <property name="text">
<property name="geometry"> <string>Game version</string>
<rect> </property>
<x>97</x> </widget>
<y>141</y> </item>
<width>277</width> <item row="6" column="0">
<height>23</height> <widget class="QLabel" name="labelTempDir">
</rect> <property name="text">
</property> <string>Log files directory</string>
<property name="text"> </property>
<string>User data directory</string> </widget>
</property> </item>
</widget> <item row="3" column="0">
<widget class="QLineEdit" name="lineEditTempDir"> <widget class="QLabel" name="labelDataDirs">
<property name="enabled"> <property name="font">
<bool>false</bool> <font>
</property> <weight>75</weight>
<property name="geometry"> <bold>true</bold>
<rect> </font>
<x>380</x> </property>
<y>170</y> <property name="text">
<width>211</width> <string>Data Directories</string>
<height>23</height> </property>
</rect> </widget>
</property> </item>
<property name="text"> <item row="4" column="1">
<string notr="true">/home/user/.vcmi</string> <widget class="QLineEdit" name="lineEditGameDir">
</property> <property name="enabled">
<property name="readOnly"> <bool>true</bool>
<bool>true</bool> </property>
</property> <property name="text">
</widget> <string notr="true">/usr/share/vcmi</string>
<widget class="QLabel" name="labelDataDirs"> </property>
<property name="geometry"> </widget>
<rect> </item>
<x>110</x> <item row="4" column="2">
<y>90</y> <widget class="QPushButton" name="openGameDataDir">
<width>277</width> <property name="text">
<height>15</height> <string>Open</string>
</rect> </property>
</property> </widget>
<property name="font"> </item>
<font> <item row="6" column="1">
<weight>75</weight> <widget class="QLineEdit" name="lineEditTempDir">
<bold>true</bold> <property name="enabled">
</font> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Data Directories</string> <string notr="true">/home/user/.vcmi</string>
</property> </property>
</widget> <property name="readOnly">
<widget class="QLineEdit" name="lineEditBuildVersion"> <bool>true</bool>
<property name="geometry"> </property>
<rect> </widget>
<x>310</x> </item>
<y>40</y> <item row="4" column="0">
<width>162</width> <widget class="QLabel" name="labelGameDir">
<height>23</height> <property name="text">
</rect> <string>Game data directory</string>
</property> </property>
<property name="text"> </widget>
<string notr="true"/> </item>
</property> <item row="2" column="0">
<property name="readOnly"> <widget class="QLabel" name="labelOperatingSystem">
<bool>true</bool> <property name="text">
</property> <string>Operating System</string>
</widget> </property>
<widget class="QLabel" name="labelBuildVersionDesc"> </widget>
<property name="geometry"> </item>
<rect> <item row="2" column="1">
<x>130</x> <widget class="QLineEdit" name="lineEditOperatingSystem">
<y>40</y> <property name="text">
<width>151</width> <string notr="true"/>
<height>23</height> </property>
</rect> <property name="readOnly">
</property> <bool>true</bool>
<property name="text"> </property>
<string>Build version</string> </widget>
</property> </item>
</widget> </layout>
<widget class="QPushButton" name="updatesButton"> </item>
<property name="geometry"> <item>
<rect> <spacer name="verticalSpacer_3">
<x>540</x> <property name="orientation">
<y>60</y> <enum>Qt::Vertical</enum>
<width>151</width> </property>
<height>23</height> <property name="sizeHint" stdset="0">
</rect> <size>
</property> <width>20</width>
<property name="text"> <height>40</height>
<string>Check for updates</string> </size>
</property> </property>
</widget> </spacer>
<widget class="QLabel" name="labelDataDirs_2"> </item>
<property name="geometry"> </layout>
<rect>
<x>180</x>
<y>210</y>
<width>277</width>
<height>15</height>
</rect>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Our Community</string>
</property>
</widget>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -219,10 +219,14 @@
<property name="text"> <property name="text">
<string>About</string> <string>About</string>
</property> </property>
<property name="icon">
<iconset>
<normaloff>icons:about-project.png</normaloff>icons:about-project.png</iconset>
</property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
<width>0</width> <width>30</width>
<height>0</height> <height>30</height>
</size> </size>
</property> </property>
<property name="checkable"> <property name="checkable">

View File

@ -38,7 +38,6 @@ class CModListView : public QWidget
void setupModModel(); void setupModModel();
void setupFilterModel(); void setupFilterModel();
void setupModsView(); void setupModsView();
void loadRepositories();
void checkManagerErrors(); void checkManagerErrors();
@ -69,6 +68,7 @@ public:
~CModListView(); ~CModListView();
void loadScreenshots(); void loadScreenshots();
void loadRepositories();
void disableModInfo(); void disableModInfo();

View File

@ -473,3 +473,15 @@ void CSettingsView::on_spinBoxInterfaceScaling_valueChanged(int arg1)
node->Float() = arg1; node->Float() = arg1;
} }
void CSettingsView::on_refreshRepositoriesButton_clicked()
{
auto * mainWindow = dynamic_cast<MainWindow *>(qApp->activeWindow());
assert(mainWindow);
if (!mainWindow)
return;
mainWindow->getModView()->loadRepositories();
}

View File

@ -59,6 +59,8 @@ private slots:
void on_spinBoxInterfaceScaling_valueChanged(int arg1); void on_spinBoxInterfaceScaling_valueChanged(int arg1);
void on_refreshRepositoriesButton_clicked();
private: private:
Ui::CSettingsView * ui; Ui::CSettingsView * ui;