forked from teamnwah/openmw-tes3coop
		
	Added version information to the launcher
This commit is contained in:
		
							parent
							
								
									c95b8bcb39
								
							
						
					
					
						commit
						fa186f5ec1
					
				
					 2 changed files with 46 additions and 5 deletions
				
			
		|  | @ -1,5 +1,8 @@ | |||
| #include "maindialog.hpp" | ||||
| 
 | ||||
| #include <components/version/version.hpp> | ||||
| 
 | ||||
| #include <QLabel> | ||||
| #include <QPushButton> | ||||
| #include <QFontDatabase> | ||||
| #include <QInputDialog> | ||||
|  | @ -67,6 +70,12 @@ Launcher::MainDialog::MainDialog(QWidget *parent) | |||
|     // Remove what's this? button
 | ||||
|     setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); | ||||
| 
 | ||||
|     // Add version information to bottom of the window
 | ||||
|     QString revision(OPENMW_VERSION_COMMIT); | ||||
|     revision = revision.left(10); | ||||
| 
 | ||||
|     versionLabel->setText(tr("OpenMW %0 revision %1").arg(OPENMW_VERSION, revision)); | ||||
| 
 | ||||
|     createIcons(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,6 +2,14 @@ | |||
| <ui version="4.0"> | ||||
|  <class>MainWindow</class> | ||||
|  <widget class="QMainWindow" name="MainWindow"> | ||||
|   <property name="geometry"> | ||||
|    <rect> | ||||
|     <x>0</x> | ||||
|     <y>0</y> | ||||
|     <width>575</width> | ||||
|     <height>535</height> | ||||
|    </rect> | ||||
|   </property> | ||||
|   <property name="minimumSize"> | ||||
|    <size> | ||||
|     <width>575</width> | ||||
|  | @ -56,11 +64,35 @@ | |||
|      </widget> | ||||
|     </item> | ||||
|     <item> | ||||
|      <widget class="QDialogButtonBox" name="buttonBox"> | ||||
|       <property name="standardButtons"> | ||||
|        <set>QDialogButtonBox::Close</set> | ||||
|       </property> | ||||
|      </widget> | ||||
|      <layout class="QHBoxLayout" name="horizontalLayout"> | ||||
|       <item> | ||||
|        <widget class="QLabel" name="versionLabel"> | ||||
|         <property name="text"> | ||||
|          <string>OpenMW version</string> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|       <item> | ||||
|        <spacer name="horizontalSpacer"> | ||||
|         <property name="orientation"> | ||||
|          <enum>Qt::Horizontal</enum> | ||||
|         </property> | ||||
|         <property name="sizeHint" stdset="0"> | ||||
|          <size> | ||||
|           <width>40</width> | ||||
|           <height>20</height> | ||||
|          </size> | ||||
|         </property> | ||||
|        </spacer> | ||||
|       </item> | ||||
|       <item> | ||||
|        <widget class="QDialogButtonBox" name="buttonBox"> | ||||
|         <property name="standardButtons"> | ||||
|          <set>QDialogButtonBox::Close</set> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|      </layout> | ||||
|     </item> | ||||
|    </layout> | ||||
|   </widget> | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue