mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-11 20:14:37 +02:00
Added warning regarding maximized option
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
81c5866fa9
commit
0f42f3cc5c
@ -411,3 +411,8 @@ void BaseInstance::updateRuntimeContext()
|
|||||||
{
|
{
|
||||||
// NOOP
|
// NOOP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BaseInstance::isLegacy()
|
||||||
|
{
|
||||||
|
return traits().contains("legacyLaunch") || traits().contains("alphaLaunch");
|
||||||
|
}
|
||||||
|
@ -269,6 +269,8 @@ class BaseInstance : public QObject, public std::enable_shared_from_this<BaseIns
|
|||||||
bool removeLinkedInstanceId(const QString& id);
|
bool removeLinkedInstanceId(const QString& id);
|
||||||
bool isLinkedToInstanceId(const QString& id) const;
|
bool isLinkedToInstanceId(const QString& id) const;
|
||||||
|
|
||||||
|
bool isLegacy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeStatus(Status newStatus);
|
void changeStatus(Status newStatus);
|
||||||
|
|
||||||
|
@ -533,7 +533,7 @@ QStringList MinecraftInstance::javaArguments()
|
|||||||
QString MinecraftInstance::getLauncher()
|
QString MinecraftInstance::getLauncher()
|
||||||
{
|
{
|
||||||
// use legacy launcher if the traits are set
|
// use legacy launcher if the traits are set
|
||||||
if (traits().contains("legacyLaunch") || traits().contains("alphaLaunch"))
|
if (isLegacy())
|
||||||
return "legacy";
|
return "legacy";
|
||||||
|
|
||||||
return "standard";
|
return "standard";
|
||||||
@ -757,7 +757,7 @@ QString MinecraftInstance::createLaunchScript(AuthSessionPtr session, MinecraftT
|
|||||||
QString windowParams;
|
QString windowParams;
|
||||||
if (settings()->get("LaunchMaximized").toBool()) {
|
if (settings()->get("LaunchMaximized").toBool()) {
|
||||||
// FIXME doesn't support maximisation
|
// FIXME doesn't support maximisation
|
||||||
if (getLauncher() == "standard") {
|
if (!isLegacy()) {
|
||||||
auto screen = QGuiApplication::primaryScreen();
|
auto screen = QGuiApplication::primaryScreen();
|
||||||
auto screenGeometry = screen->availableSize();
|
auto screenGeometry = screen->availableSize();
|
||||||
|
|
||||||
|
@ -55,6 +55,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="maximizedWarning">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>On newer versions the game only supports resolution. In order to simulate the maximized behaviour the current implementation approximates the maximum display size.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p><span style=" font-weight:600; color:#f5c211;">Warning</span><span style=" color:#f5c211;">: On the newer Minecraft versions the start maximized option is not fully supported.</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayoutWindowSize">
|
<layout class="QGridLayout" name="gridLayoutWindowSize">
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
|
@ -323,6 +323,7 @@ void InstanceSettingsPage::loadSettings()
|
|||||||
// Window Size
|
// Window Size
|
||||||
ui->windowSizeGroupBox->setChecked(m_settings->get("OverrideWindow").toBool());
|
ui->windowSizeGroupBox->setChecked(m_settings->get("OverrideWindow").toBool());
|
||||||
ui->maximizedCheckBox->setChecked(m_settings->get("LaunchMaximized").toBool());
|
ui->maximizedCheckBox->setChecked(m_settings->get("LaunchMaximized").toBool());
|
||||||
|
ui->maximizedWarning->setVisible(m_settings->get("LaunchMaximized").toBool() && !m_instance->isLegacy());
|
||||||
ui->windowWidthSpinBox->setValue(m_settings->get("MinecraftWinWidth").toInt());
|
ui->windowWidthSpinBox->setValue(m_settings->get("MinecraftWinWidth").toInt());
|
||||||
ui->windowHeightSpinBox->setValue(m_settings->get("MinecraftWinHeight").toInt());
|
ui->windowHeightSpinBox->setValue(m_settings->get("MinecraftWinHeight").toInt());
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="settingsTabs">
|
<widget class="QTabWidget" name="settingsTabs">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="minecraftPage">
|
<widget class="QWidget" name="minecraftPage">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -285,6 +285,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="maximizedWarning">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>The base game only supports resolution. In order to simulate the maximized behaviour the current implementation approximates the maximum display size..</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p><span style=" font-weight:600; color:#f5c211;">Warning</span><span style=" color:#f5c211;">: The maximized option may not be fully supported for the current minecraft version.</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayoutWindowSize">
|
<layout class="QGridLayout" name="gridLayoutWindowSize">
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user