Skip to content

Commit

Permalink
Improved HiDPI support and added Stable Tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
LRFLEW committed Feb 7, 2016
1 parent c4c697f commit 281e69e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
23 changes: 22 additions & 1 deletion OpenRCT2Launcher/configuration.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,27 @@
<x>0</x>
<y>0</y>
<width>720</width>
<height>471</height>
<height>480</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>720</width>
<height>480</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>720</width>
<height>480</height>
</size>
</property>
<property name="windowTitle">
<string>Options</string>
</property>
Expand Down Expand Up @@ -88,6 +106,9 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Stable is not currently avaiable through the launcher</string>
</property>
<property name="text">
<string>Stable</string>
</property>
Expand Down
5 changes: 4 additions & 1 deletion OpenRCT2Launcher/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ MainWindow::MainWindow(QWidget *parent) :
ui->progressBar->setHidden(true);
connect(ui->launchButton, &QPushButton::clicked, this, &MainWindow::launch);

#ifndef Q_OS_OSX
ui->splash->setScaledContents(true);
#endif

connect(&updater, &Updater::installed, [this]{ ui->progressBar->setHidden(true); ui->launchButton->setEnabled(true); });
connect(&updater, &Updater::error, [this](QString error){ ui->errorLabel->setText(error); ui->launchButton->setEnabled(true); });
connect(&updater, &Updater::downloadProgress, [this](qint64 bytesReceived, qint64 bytesTotal){
Expand All @@ -28,7 +32,6 @@ MainWindow::~MainWindow()
delete ui;
}

#include <QFileDialog>
void MainWindow::on_optionsButton_clicked() {
QDir dir = QDir::home();
if (dir.cd(OPENRCT2_BASE)) {
Expand Down
23 changes: 22 additions & 1 deletion OpenRCT2Launcher/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@
<height>280</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>420</width>
<height>280</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>420</width>
<height>280</height>
</size>
</property>
<property name="windowTitle">
<string>OpenRCT2 Launcher</string>
</property>
Expand All @@ -31,10 +49,13 @@
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<widget class="QLabel" name="splash">
<property name="pixmap">
<pixmap resource="resources.qrc">:/splash.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
</property>
</widget>
</item>
<item>
Expand Down

0 comments on commit 281e69e

Please sign in to comment.