1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 15:45:33 +00:00

Merge branch 'wizard_update' into 'master'

UI fixes for Wizard

See merge request OpenMW/openmw!4069
This commit is contained in:
psi29a 2024-05-09 08:45:29 +00:00
commit 99ac6c40e5
7 changed files with 88 additions and 63 deletions

View file

@ -5,6 +5,8 @@
#include <QFileInfo> #include <QFileInfo>
#include <QMessageBox> #include <QMessageBox>
#include <components/misc/scalableicon.hpp>
#include "mainwizard.hpp" #include "mainwizard.hpp"
Wizard::ExistingInstallationPage::ExistingInstallationPage(QWidget* parent) Wizard::ExistingInstallationPage::ExistingInstallationPage(QWidget* parent)
@ -18,6 +20,8 @@ Wizard::ExistingInstallationPage::ExistingInstallationPage(QWidget* parent)
QListWidgetItem* emptyItem = new QListWidgetItem(tr("No existing installations detected")); QListWidgetItem* emptyItem = new QListWidgetItem(tr("No existing installations detected"));
emptyItem->setFlags(Qt::NoItemFlags); emptyItem->setFlags(Qt::NoItemFlags);
browseButton->setIcon(Misc::ScalableIcon::load(":folder"));
installationsList->insertItem(0, emptyItem); installationsList->insertItem(0, emptyItem);
} }

View file

@ -8,6 +8,7 @@
#include <components/files/configurationmanager.hpp> #include <components/files/configurationmanager.hpp>
#include <components/files/conversion.hpp> #include <components/files/conversion.hpp>
#include <components/misc/scalableicon.hpp>
#include "mainwizard.hpp" #include "mainwizard.hpp"
@ -19,7 +20,7 @@ Wizard::InstallationTargetPage::InstallationTargetPage(QWidget* parent, const Fi
setupUi(this); setupUi(this);
folderIconLabel->setPixmap(QIcon(":folder").pixmap(QSize(48, 48))); folderIcon->setIcon(Misc::ScalableIcon::load(":folder"));
registerField(QLatin1String("installation.path*"), targetLineEdit); registerField(QLatin1String("installation.path*"), targetLineEdit);
} }

View file

@ -1,5 +1,7 @@
#include "languageselectionpage.hpp" #include "languageselectionpage.hpp"
#include <components/misc/scalableicon.hpp>
#include "mainwizard.hpp" #include "mainwizard.hpp"
Wizard::LanguageSelectionPage::LanguageSelectionPage(QWidget* parent) Wizard::LanguageSelectionPage::LanguageSelectionPage(QWidget* parent)
@ -9,7 +11,7 @@ Wizard::LanguageSelectionPage::LanguageSelectionPage(QWidget* parent)
setupUi(this); setupUi(this);
flagIconLabel->setPixmap(QIcon(":preferences-desktop-locale").pixmap(QSize(48, 48))); flagIcon->setIcon(Misc::ScalableIcon::load(":preferences-desktop-locale"));
registerField(QLatin1String("installation.language"), languageComboBox, "currentData", "currentDataChanged"); registerField(QLatin1String("installation.language"), languageComboBox, "currentData", "currentDataChanged");
} }

View file

@ -1,6 +1,8 @@
#include "methodselectionpage.hpp" #include "methodselectionpage.hpp"
#include "mainwizard.hpp" #include "mainwizard.hpp"
#include <components/misc/scalableicon.hpp>
#include <QDesktopServices> #include <QDesktopServices>
#include <QUrl> #include <QUrl>
@ -11,9 +13,9 @@ Wizard::MethodSelectionPage::MethodSelectionPage(QWidget* parent)
setupUi(this); setupUi(this);
installerIconLabel->setPixmap(QIcon(":system-installer").pixmap(QSize(48, 48))); installerIcon->setIcon(Misc::ScalableIcon::load(":system-installer"));
folderIconLabel->setPixmap(QIcon(":folder").pixmap(QSize(48, 48))); folderIcon->setIcon(Misc::ScalableIcon::load(":folder"));
buyIconLabel->setPixmap(QIcon(":dollar").pixmap(QSize(48, 48))); buyLinkButton->setIcon(Misc::ScalableIcon::load(":dollar"));
#ifndef OPENMW_USE_UNSHIELD #ifndef OPENMW_USE_UNSHIELD
retailDiscRadioButton->setEnabled(false); retailDiscRadioButton->setEnabled(false);
@ -23,7 +25,7 @@ Wizard::MethodSelectionPage::MethodSelectionPage(QWidget* parent)
registerField(QLatin1String("installation.retailDisc"), retailDiscRadioButton); registerField(QLatin1String("installation.retailDisc"), retailDiscRadioButton);
connect(buyLinkButton, &QCommandLinkButton::released, this, &MethodSelectionPage::handleBuyButton); connect(buyLinkButton, &QPushButton::released, this, &MethodSelectionPage::handleBuyButton);
} }
int Wizard::MethodSelectionPage::nextId() const int Wizard::MethodSelectionPage::nextId() const

View file

@ -23,18 +23,18 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QLabel" name="folderIconLabel"> <widget class="QToolButton" name="folderIcon">
<property name="sizePolicy"> <property name="styleSheet">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum"> <string notr="true">QToolButton { border: none; padding: 0px; }</string>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="textFormat"> <property name="text">
<enum>Qt::RichText</enum> <string/>
</property> </property>
<property name="alignment"> <property name="iconSize">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <size>
<width>48</width>
<height>48</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
@ -80,7 +80,7 @@
</layout> </layout>
</widget> </widget>
<resources> <resources>
<include location="../../wizard/wizard.qrc"/> <include location="../../../files/wizard/wizard.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View file

@ -23,18 +23,18 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QLabel" name="flagIconLabel"> <widget class="QToolButton" name="flagIcon">
<property name="sizePolicy"> <property name="styleSheet">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum"> <string notr="true">QToolButton { border: none; padding: 0px; }</string>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="textFormat"> <property name="text">
<enum>Qt::RichText</enum> <string/>
</property> </property>
<property name="alignment"> <property name="iconSize">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <size>
<width>48</width>
<height>48</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>

View file

@ -52,24 +52,18 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="installerIconLabel"> <widget class="QToolButton" name="installerIcon">
<property name="sizePolicy"> <property name="styleSheet">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum"> <string notr="true">QToolButton { border: none; padding: 0px; }</string>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="textFormat"> <property name="text">
<enum>Qt::RichText</enum> <string/>
</property> </property>
<property name="scaledContents"> <property name="iconSize">
<bool>false</bool> <size>
</property> <width>48</width>
<property name="alignment"> <height>48</height>
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> </size>
</property>
<property name="buddy">
<cstring>retailDiscRadioButton</cstring>
</property> </property>
</widget> </widget>
</item> </item>
@ -114,18 +108,15 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="folderIconLabel"> <widget class="QToolButton" name="folderIcon">
<property name="sizePolicy"> <property name="styleSheet">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum"> <string notr="true">QToolButton { border: none; padding: 0px; }</string>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="textFormat"> <property name="iconSize">
<enum>Qt::RichText</enum> <size>
</property> <width>48</width>
<property name="alignment"> <height>48</height>
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> </size>
</property> </property>
</widget> </widget>
</item> </item>
@ -150,6 +141,19 @@
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_5">
<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> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
@ -157,6 +161,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item> <item>
@ -167,7 +184,7 @@
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Maximum</enum> <enum>QSizePolicy::Expanding</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
@ -178,22 +195,21 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="buyIconLabel"> <widget class="QPushButton" name="buyLinkButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
</widget>
</item>
<item>
<widget class="QCommandLinkButton" name="buyLinkButton">
<property name="text"> <property name="text">
<string>Buy the game</string> <string>Buy the game</string>
</property> </property>
<property name="checkable"> <property name="iconSize">
<bool>false</bool> <size>
<width>48</width>
<height>48</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>