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->lineEditTempDir->setText(pathToQString(VCMIDirs::get().userLogsPath()));
ui->lineEditBuildVersion->setText(QString::fromStdString(GameConstants::VCMI_VERSION));
ui->lineEditOperatingSystem->setText(QSysInfo::prettyProductName());
}
void AboutProjectView::on_updatesButton_clicked()

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

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

View File

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

View File

@ -473,3 +473,15 @@ void CSettingsView::on_spinBoxInterfaceScaling_valueChanged(int 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_refreshRepositoriesButton_clicked();
private:
Ui::CSettingsView * ui;