summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/installerfw.qdoc8
-rw-r--r--src/libs/installer/constants.h2
-rw-r--r--src/libs/installer/packagemanagergui.cpp4
-rw-r--r--src/libs/installer/settings.cpp11
-rw-r--r--src/libs/installer/settings.h2
-rw-r--r--tests/auto/installer/settings/data/full_config.xml2
-rw-r--r--tests/auto/installer/settings/tst_settings.cpp2
7 files changed, 31 insertions, 0 deletions
diff --git a/doc/installerfw.qdoc b/doc/installerfw.qdoc
index c9250dee0..bf8475c11 100644
--- a/doc/installerfw.qdoc
+++ b/doc/installerfw.qdoc
@@ -211,6 +211,14 @@
\li WizardStyle
\li Set the wizard style to be used ("Modern", "Mac", "Aero" or "Classic").
\row
+ \li WizardDefaultWidth
+ \li Sets the default width of the wizard in pixels. Setting a banner image will
+ override this.
+ \row
+ \li WizardDefaultHeight
+ \li Sets the default height of the wizard in pixels. Setting a watermark image will
+ override this.
+ \row
\li TitleColor
\li Set the color of the titles and subtitles (takes an HTML color code,
such as "#88FF33").
diff --git a/src/libs/installer/constants.h b/src/libs/installer/constants.h
index 3fe3b8367..8ad1b2f79 100644
--- a/src/libs/installer/constants.h
+++ b/src/libs/installer/constants.h
@@ -85,6 +85,8 @@ static const QLatin1String scRepositorySettingsPageVisible("RepositorySettingsPa
static const QLatin1String scAllowSpaceInPath("AllowSpaceInPath");
static const QLatin1String scWizardStyle("WizardStyle");
static const QLatin1String scTitleColor("TitleColor");
+static const QLatin1String scWizardDefaultWidth("WizardDefaultWidth");
+static const QLatin1String scWizardDefaultHeight("WizardDefaultHeight");
}
#endif // CONSTANTS_H
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index 3b7b3b178..ee1ba72de 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -478,6 +478,10 @@ void PackageManagerGui::showEvent(QShowEvent *event)
}
}
setMinimumSize(size());
+ if (minimumWidth() < m_core->settings().wizardDefaultWidth())
+ resize(m_core->settings().wizardDefaultWidth(), height());
+ if (minimumHeight() < m_core->settings().wizardDefaultHeight())
+ resize(width(), m_core->settings().wizardDefaultHeight());
}
QWizard::showEvent(event);
QMetaObject::invokeMethod(this, "dependsOnLocalInstallerBinary", Qt::QueuedConnection);
diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp
index 4ff66a7da..c00cfd794 100644
--- a/src/libs/installer/settings.cpp
+++ b/src/libs/installer/settings.cpp
@@ -251,6 +251,7 @@ Settings Settings::fromFileAndPrefix(const QString &path, const QString &prefix,
<< scRunProgram << scRunProgramArguments << scRunProgramDescription
<< scDependsOnLocalInstallerBinary
<< scAllowSpaceInPath << scAllowNonAsciiCharacters << scWizardStyle << scTitleColor
+ << scWizardDefaultWidth << scWizardDefaultHeight
<< scRepositorySettingsPageVisible << scTargetConfigurationFile
<< scRemoteRepositories << scTranslations;
@@ -370,6 +371,16 @@ QString Settings::titleColor() const
return d->m_data.value(scTitleColor).toString();
}
+int Settings::wizardDefaultWidth() const
+{
+ return d->m_data.value(scWizardDefaultWidth).toInt();
+}
+
+int Settings::wizardDefaultHeight() const
+{
+ return d->m_data.value(scWizardDefaultHeight).toInt();
+}
+
QString Settings::installerApplicationIcon() const
{
return d->absolutePathFromKey(scInstallerApplicationIcon, systemIconSuffix());
diff --git a/src/libs/installer/settings.h b/src/libs/installer/settings.h
index ab74886bb..33f6c0ae1 100644
--- a/src/libs/installer/settings.h
+++ b/src/libs/installer/settings.h
@@ -90,6 +90,8 @@ public:
QString systemIconSuffix() const;
QString wizardStyle() const;
QString titleColor() const;
+ int wizardDefaultWidth() const;
+ int wizardDefaultHeight() const;
QString applicationName() const;
QString applicationVersion() const;
diff --git a/tests/auto/installer/settings/data/full_config.xml b/tests/auto/installer/settings/data/full_config.xml
index 51b63315a..52e18c904 100644
--- a/tests/auto/installer/settings/data/full_config.xml
+++ b/tests/auto/installer/settings/data/full_config.xml
@@ -21,6 +21,8 @@ File should contain all elements we allow in a config.xml
<Banner>banner</Banner>
<Background>background</Background>
<WizardStyle>Modern</WizardStyle>
+ <WizardDefaultWidth>800</WizardDefaultWidth>
+ <WizardDefaultHeight>600</WizardDefaultHeight>
<StartMenuDir>Super App</StartMenuDir>
diff --git a/tests/auto/installer/settings/tst_settings.cpp b/tests/auto/installer/settings/tst_settings.cpp
index 5f806763a..24095c966 100644
--- a/tests/auto/installer/settings/tst_settings.cpp
+++ b/tests/auto/installer/settings/tst_settings.cpp
@@ -57,6 +57,8 @@ void tst_Settings::loadTutorialConfig()
QCOMPARE(settings.systemIconSuffix(), QLatin1String(".png"));
#endif
QCOMPARE(settings.wizardStyle(), QString());
+ QCOMPARE(settings.wizardDefaultWidth(), 0);
+ QCOMPARE(settings.wizardDefaultHeight(), 0);
QCOMPARE(settings.titleColor(), QString());
QCOMPARE(settings.runProgram(), QString());
QCOMPARE(settings.runProgramArguments(), QStringList());