Rework Minecraft and Java settings

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2025-03-24 00:29:07 +00:00
parent adf2ed0849
commit 3922136f6d
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
9 changed files with 776 additions and 311 deletions

View file

@ -665,6 +665,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
m_settings->registerSetting("AutomaticJavaSwitch", defaultEnableAutoJava); m_settings->registerSetting("AutomaticJavaSwitch", defaultEnableAutoJava);
m_settings->registerSetting("AutomaticJavaDownload", defaultEnableAutoJava); m_settings->registerSetting("AutomaticJavaDownload", defaultEnableAutoJava);
m_settings->registerSetting("UserAskedAboutAutomaticJavaDownload", false); m_settings->registerSetting("UserAskedAboutAutomaticJavaDownload", false);
m_settings->registerSetting("AdvancedJavaMemoryControl", false);
// Legacy settings // Legacy settings
m_settings->registerSetting("OnlineFixes", false); m_settings->registerSetting("OnlineFixes", false);

View file

@ -93,7 +93,7 @@ void JavaCommon::javaBinaryWasBad(QWidget* parent, const JavaChecker::Result& re
{ {
QString text; QString text;
text += QObject::tr( text += QObject::tr(
"The specified Java binary didn't work.<br />You should use the auto-detect feature, " "The specified Java binary didn't work.<br />You should press 'Detect', "
"or set the path to the Java executable.<br />"); "or set the path to the Java executable.<br />");
CustomMessageBox::selectable(parent, QObject::tr("Java test failure"), text, QMessageBox::Warning)->show(); CustomMessageBox::selectable(parent, QObject::tr("Java test failure"), text, QMessageBox::Warning)->show();
} }

View file

@ -32,7 +32,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="general"> <widget class="QWidget" name="general">
<attribute name="title"> <attribute name="title">
@ -50,7 +50,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>535</width> <width>535</width>
<height>610</height> <height>606</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
@ -73,19 +73,9 @@
<property name="title"> <property name="title">
<string>Downloaded Java Versions</string> <string>Downloaded Java Versions</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_5">
<item> <item>
<widget class="VersionSelectWidget" name="managedJavaList" native="true"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="managedJavaBtnLayout">
<item> <item>
<widget class="QPushButton" name="downloadJavaButton"> <widget class="QPushButton" name="downloadJavaButton">
<property name="text"> <property name="text">
@ -101,14 +91,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_2"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>40</width>
<height>40</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
@ -122,22 +112,19 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="VersionSelectWidget" name="managedJavaList" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<spacer name="managementSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>

View file

@ -239,6 +239,9 @@
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text"> <property name="text">
<string>Transparent</string> <string>Transparent</string>
</property> </property>
@ -247,7 +250,7 @@
<item row="2" column="3"> <item row="2" column="3">
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_5">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>false</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Opaque</string> <string>Opaque</string>

View file

@ -35,6 +35,44 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="buttons">
<item>
<widget class="QPushButton" name="add">
<property name="text">
<string>&amp;Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="remove">
<property name="text">
<string>&amp;Remove</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="QPushButton" name="clear">
<property name="text">
<string>&amp;Clear</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<widget class="QTreeWidget" name="list"> <widget class="QTreeWidget" name="list">
<property name="alternatingRowColors"> <property name="alternatingRowColors">
@ -67,44 +105,6 @@
</column> </column>
</widget> </widget>
</item> </item>
<item>
<layout class="QHBoxLayout" name="buttons">
<item>
<widget class="QPushButton" name="add">
<property name="text">
<string>&amp;Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="remove">
<property name="text">
<string>&amp;Remove</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clear">
<property name="text">
<string>&amp;Clear</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>
</layout>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View file

@ -53,6 +53,11 @@
#include "ui_JavaSettingsWidget.h" #include "ui_JavaSettingsWidget.h"
static QString formatGiBLabel(int value)
{
return QObject::tr("%1 GiB").arg(value / 1024.0, 0, 'f', 1);
}
JavaSettingsWidget::JavaSettingsWidget(InstancePtr instance, QWidget* parent) JavaSettingsWidget::JavaSettingsWidget(InstancePtr instance, QWidget* parent)
: QWidget(parent), m_instance(std::move(instance)), m_ui(new Ui::JavaSettingsWidget) : QWidget(parent), m_instance(std::move(instance)), m_ui(new Ui::JavaSettingsWidget)
{ {
@ -101,11 +106,50 @@ JavaSettingsWidget::JavaSettingsWidget(InstancePtr instance, QWidget* parent)
connect(m_ui->javaDetectBtn, &QPushButton::clicked, this, &JavaSettingsWidget::onJavaAutodetect); connect(m_ui->javaDetectBtn, &QPushButton::clicked, this, &JavaSettingsWidget::onJavaAutodetect);
connect(m_ui->javaBrowseBtn, &QPushButton::clicked, this, &JavaSettingsWidget::onJavaBrowse); connect(m_ui->javaBrowseBtn, &QPushButton::clicked, this, &JavaSettingsWidget::onJavaBrowse);
connect(m_ui->maxMemSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &JavaSettingsWidget::updateThresholds); connect(m_ui->minMemSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), m_ui->minMemSlider, [this](int value) {
connect(m_ui->minMemSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &JavaSettingsWidget::updateThresholds); m_ui->minMemSlider->blockSignals(true);
m_ui->minMemSlider->setValue(value);
m_ui->minMemSlider->blockSignals(false);
});
connect(m_ui->maxMemSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), m_ui->maxMemSlider, [this](int value) {
m_ui->maxMemSlider->blockSignals(true);
m_ui->maxMemSlider->setValue(value);
m_ui->maxMemSlider->blockSignals(false);
});
connect(m_ui->minMemSlider, &QAbstractSlider::valueChanged, m_ui->minMemSpinBox, QOverload<int>::of(&QSpinBox::setValue));
connect(m_ui->maxMemSlider, &QAbstractSlider::valueChanged, m_ui->maxMemSpinBox, QOverload<int>::of(&QSpinBox::setValue));
connect(m_ui->minMemSpinBox, &QAbstractSpinBox::editingFinished, this, &JavaSettingsWidget::finishAdjustingMinMemory);
connect(m_ui->maxMemSpinBox, &QAbstractSpinBox::editingFinished, this, &JavaSettingsWidget::finishAdjustingMaxMemory);
connect(m_ui->minMemSlider, &QAbstractSlider::valueChanged, this, &JavaSettingsWidget::finishAdjustingMinMemory);
connect(m_ui->maxMemSlider, &QAbstractSlider::valueChanged, this, &JavaSettingsWidget::finishAdjustingMaxMemory);
connect(m_ui->maxMemSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &JavaSettingsWidget::onMemoryChange);
connect(m_ui->minMemSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &JavaSettingsWidget::onMemoryChange);
int maxSystemMemory = (Sys::getSystemRam() / Sys::mebibyte) - 1;
m_ui->minMemSlider->setMaximum(maxSystemMemory - 1);
m_ui->maxMemSlider->setMaximum(maxSystemMemory - 1);
m_ui->minMemMaxValueHint->setText(formatGiBLabel(maxSystemMemory - 1));
m_ui->maxMemMaxValueHint->setText(formatGiBLabel(maxSystemMemory - 1));
SettingsObjectPtr settings = APPLICATION->settings();
enableAdvancedMemoryControl(settings->get("AdvancedJavaMemoryControl").toBool());
connect(m_ui->memorySimpleButton, &QPushButton::clicked, this, [this, settings] () {
enableAdvancedMemoryControl(false);
settings->set("AdvancedJavaMemoryControl", false);
});
connect(m_ui->memoryAdvancedButton, &QPushButton::clicked, this, [this, settings] () {
enableAdvancedMemoryControl(true);
settings->set("AdvancedJavaMemoryControl", true);
});
loadSettings(); loadSettings();
updateThresholds(); onMemoryChange();
} }
JavaSettingsWidget::~JavaSettingsWidget() JavaSettingsWidget::~JavaSettingsWidget()
@ -283,32 +327,43 @@ void JavaSettingsWidget::onJavaAutodetect()
} }
} }
} }
void JavaSettingsWidget::updateThresholds()
void JavaSettingsWidget::onMemoryChange()
{ {
auto sysMiB = Sys::getSystemRam() / Sys::mebibyte; auto sysMiB = Sys::getSystemRam() / Sys::mebibyte;
unsigned int maxMem = m_ui->maxMemSpinBox->value(); unsigned int maxMem = m_ui->maxMemSpinBox->value();
unsigned int minMem = m_ui->minMemSpinBox->value();
QString iconName;
if (maxMem >= sysMiB) { if (maxMem >= sysMiB) {
iconName = "status-bad"; m_ui->labelMaxMemNotice->setText(QString("<span style='color:red'>%1</span>").arg(tr("Your maximum memory allocation exceeds your system memory capacity.")));
m_ui->labelMaxMemIcon->setToolTip(tr("Your maximum memory allocation exceeds your system memory capacity.")); m_ui->labelMaxMemNotice->show();
} else if (maxMem > (sysMiB * 0.9)) { } else if (maxMem > (sysMiB * 0.9)) {
iconName = "status-yellow"; // TODO: where is this colour from
m_ui->labelMaxMemIcon->setToolTip(tr("Your maximum memory allocation approaches your system memory capacity.")); m_ui->labelMaxMemNotice->setText(QString("<span style='color:#f5c211'>%1</span>")
} else if (maxMem < minMem) { .arg(tr("Your maximum memory allocation is close to your system memory capacity.")));
iconName = "status-yellow"; m_ui->labelMaxMemNotice->show();
m_ui->labelMaxMemIcon->setToolTip(tr("Your maximum memory allocation is smaller than the minimum value"));
} else { } else {
iconName = "status-good"; m_ui->labelMaxMemNotice->hide();
m_ui->labelMaxMemIcon->setToolTip("");
} }
{ m_ui->minMemGBLabel->setText(formatGiBLabel(m_ui->minMemSlider->value()));
auto height = m_ui->labelMaxMemIcon->fontInfo().pixelSize(); m_ui->maxMemGBLabel->setText(formatGiBLabel(m_ui->maxMemSlider->value()));
QIcon icon = APPLICATION->getThemedIcon(iconName); }
QPixmap pix = icon.pixmap(height, height);
m_ui->labelMaxMemIcon->setPixmap(pix); void JavaSettingsWidget::finishAdjustingMinMemory()
} {
if (m_ui->minMemSpinBox->value() > m_ui->maxMemSpinBox->value())
m_ui->maxMemSpinBox->setValue(m_ui->minMemSpinBox->value());
}
void JavaSettingsWidget::finishAdjustingMaxMemory()
{
if (m_ui->maxMemSpinBox->value() < m_ui->minMemSpinBox->value())
m_ui->minMemSpinBox->setValue(m_ui->maxMemSpinBox->value());
}
void JavaSettingsWidget::enableAdvancedMemoryControl(bool enabled) {
m_ui->memorySimpleButton->setChecked(!enabled);
m_ui->memoryAdvancedButton->setChecked(enabled);
m_ui->memorySimple->setVisible(!enabled);
m_ui->memoryAdvanced->setVisible(enabled);
} }

View file

@ -59,7 +59,10 @@ class JavaSettingsWidget : public QWidget {
void onJavaBrowse(); void onJavaBrowse();
void onJavaAutodetect(); void onJavaAutodetect();
void onJavaTest(); void onJavaTest();
void updateThresholds(); void onMemoryChange();
void finishAdjustingMinMemory();
void finishAdjustingMaxMemory();
void enableAdvancedMemoryControl(bool enabled);
private: private:
InstancePtr m_instance; InstancePtr m_instance;

View file

@ -7,13 +7,56 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>500</width> <width>500</width>
<height>600</height> <height>1123</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="javaTestBtn">
<property name="text">
<string>Test S&amp;ettings</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="javaDownloadBtn">
<property name="text">
<string>Open Java &amp;Downloader</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item> <item>
<widget class="QGroupBox" name="javaInstallationGroupBox"> <widget class="QGroupBox" name="javaInstallationGroupBox">
<property name="enabled"> <property name="enabled">
@ -29,6 +72,43 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLineEdit" name="javaPathTextBox"/>
</item>
<item>
<widget class="QPushButton" name="javaDetectBtn">
<property name="text">
<string>&amp;Detect</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="javaBrowseBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Browse</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="skipCompatibilityCheckBox">
<property name="toolTip">
<string>If enabled, the launcher will not check if an instance is compatible with the selected Java version.</string>
</property>
<property name="text">
<string>Skip Java compatibility checks</string>
</property>
</widget>
</item>
<item row="6" column="0"> <item row="6" column="0">
<widget class="QCheckBox" name="autodetectJavaCheckBox"> <widget class="QCheckBox" name="autodetectJavaCheckBox">
<property name="text"> <property name="text">
@ -36,45 +116,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLineEdit" name="javaPathTextBox"/>
</item>
<item>
<widget class="QPushButton" name="javaBrowseBtn">
<property name="text">
<string>Browse</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="javaDownloadBtn">
<property name="text">
<string>Download Java</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="javaDetectBtn">
<property name="text">
<string>Auto-detect...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="javaTestBtn">
<property name="text">
<string>Test</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="0"> <item row="7" column="0">
<widget class="QCheckBox" name="autodownloadJavaCheckBox"> <widget class="QCheckBox" name="autodownloadJavaCheckBox">
<property name="toolTip"> <property name="toolTip">
@ -95,13 +136,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="skipCompatibilityCheckBox"> <widget class="QLabel" name="label_4">
<property name="toolTip">
<string>If enabled, the launcher will not check if an instance is compatible with the selected Java version.</string>
</property>
<property name="text"> <property name="text">
<string>Skip Java compatibility checks</string> <string>Java &amp;Executable</string>
</property>
<property name="buddy">
<cstring>javaPathTextBox</cstring>
</property> </property>
</widget> </widget>
</item> </item>
@ -122,104 +163,422 @@
<property name="checked"> <property name="checked">
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QGridLayout" name="gridLayout_5" columnstretch="1,0,0"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item row="2" column="0"> <item>
<widget class="QLabel" name="labelPermGen"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="memorySimpleButton">
<property name="text">
<string>Simple</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="memoryAdvancedButton">
<property name="text">
<string>Advanced</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</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>
</item>
<item>
<widget class="QWidget" name="memorySimple" native="true">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="labelMinMem">
<property name="text">
<string>M&amp;inimum Memory Usage</string>
</property>
<property name="buddy">
<cstring>minMemSpinBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="minMemGBLabel">
<property name="text">
<string>0 GiB</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="minMemSlider">
<property name="minimum">
<number>8</number>
</property>
<property name="maximum">
<number>8192</number>
</property>
<property name="singleStep">
<number>512</number>
</property>
<property name="pageStep">
<number>512</number>
</property>
<property name="tracking">
<bool>true</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>1024</number>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="minMemMinValueHint">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>0 GiB</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="QLabel" name="minMemMaxValueHint">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>8 GiB</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="labelMaxMem">
<property name="text">
<string>M&amp;aximum Memory Usage</string>
</property>
<property name="buddy">
<cstring>maxMemSpinBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="maxMemGBLabel">
<property name="text">
<string>0 GiB</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="maxMemSlider">
<property name="minimum">
<number>8</number>
</property>
<property name="maximum">
<number>8192</number>
</property>
<property name="singleStep">
<number>512</number>
</property>
<property name="pageStep">
<number>512</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>1024</number>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="maxMemMinValueHint">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>0 GiB</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<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="QLabel" name="maxMemMaxValueHint">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>8 GiB</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="memoryAdvanced" native="true">
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>Minimum Memory Allocation</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>-Xm&amp;s=</string>
</property>
<property name="buddy">
<cstring>minMemSpinBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="minMemSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>The amount of memory Minecraft is started with.</string>
</property>
<property name="suffix">
<string notr="true">M</string>
</property>
<property name="minimum">
<number>8</number>
</property>
<property name="maximum">
<number>1048576</number>
</property>
<property name="singleStep">
<number>128</number>
</property>
<property name="value">
<number>256</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<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>
</item>
<item>
<widget class="QLabel" name="label_10">
<property name="text">
<string>Maximum Memory Allocation</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>-Xm&amp;x=</string>
</property>
<property name="buddy">
<cstring>maxMemSpinBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="maxMemSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>The maximum amount of memory Minecraft is allowed to use.</string>
</property>
<property name="suffix">
<string notr="true">M</string>
</property>
<property name="minimum">
<number>8</number>
</property>
<property name="maximum">
<number>1048576</number>
</property>
<property name="singleStep">
<number>128</number>
</property>
<property name="value">
<number>1024</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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>
</item>
<item>
<widget class="QLabel" name="label_11">
<property name="text">
<string>PermGen Size</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>-XX:&amp;PermSize=</string>
</property>
<property name="buddy">
<cstring>permGenSpinBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="permGenSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>The amount of memory available to store loaded Java classes.</string>
</property>
<property name="suffix">
<string notr="true">M</string>
</property>
<property name="minimum">
<number>4</number>
</property>
<property name="maximum">
<number>999999999</number>
</property>
<property name="singleStep">
<number>8</number>
</property>
<property name="value">
<number>64</number>
</property>
</widget>
</item>
<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>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="labelMaxMemNotice">
<property name="text"> <property name="text">
<string>PermGen (Java 7 and earlier):</string> <string>Maximum Memory Notice</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelMinMem">
<property name="text">
<string>Minimum memory allocation:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="permGenSpinBox">
<property name="toolTip">
<string>The amount of memory available to store loaded Java classes.</string>
</property>
<property name="suffix">
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>4</number>
</property>
<property name="maximum">
<number>999999999</number>
</property>
<property name="singleStep">
<number>8</number>
</property>
<property name="value">
<number>64</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelMaxMem">
<property name="text">
<string>Maximum memory allocation:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="labelMaxMemIcon">
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="buddy">
<cstring>maxMemSpinBox</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="maxMemSpinBox">
<property name="toolTip">
<string>The maximum amount of memory Minecraft is allowed to use.</string>
</property>
<property name="suffix">
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>8</number>
</property>
<property name="maximum">
<number>1048576</number>
</property>
<property name="singleStep">
<number>128</number>
</property>
<property name="value">
<number>1024</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="minMemSpinBox">
<property name="toolTip">
<string>The amount of memory Minecraft is started with.</string>
</property>
<property name="suffix">
<string notr="true"> MiB</string>
</property>
<property name="minimum">
<number>8</number>
</property>
<property name="maximum">
<number>1048576</number>
</property>
<property name="singleStep">
<number>128</number>
</property>
<property name="value">
<number>256</number>
</property> </property>
</widget> </widget>
</item> </item>
@ -251,17 +610,10 @@
</widget> </widget>
<tabstops> <tabstops>
<tabstop>javaPathTextBox</tabstop> <tabstop>javaPathTextBox</tabstop>
<tabstop>javaBrowseBtn</tabstop>
<tabstop>javaDownloadBtn</tabstop>
<tabstop>javaDetectBtn</tabstop>
<tabstop>javaTestBtn</tabstop>
<tabstop>skipCompatibilityCheckBox</tabstop> <tabstop>skipCompatibilityCheckBox</tabstop>
<tabstop>skipWizardCheckBox</tabstop> <tabstop>skipWizardCheckBox</tabstop>
<tabstop>autodetectJavaCheckBox</tabstop> <tabstop>autodetectJavaCheckBox</tabstop>
<tabstop>autodownloadJavaCheckBox</tabstop> <tabstop>autodownloadJavaCheckBox</tabstop>
<tabstop>minMemSpinBox</tabstop>
<tabstop>maxMemSpinBox</tabstop>
<tabstop>permGenSpinBox</tabstop>
<tabstop>jvmArgsTextBox</tabstop> <tabstop>jvmArgsTextBox</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>

View file

@ -51,9 +51,6 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="widgetResizable"> <property name="widgetResizable">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -61,9 +58,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>-253</y> <y>0</y>
<width>610</width> <width>610</width>
<height>550</height> <height>610</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
@ -100,23 +97,73 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QGridLayout" name="gridLayoutWindowSize"> <spacer name="verticalSpacer_4">
<item row="1" column="0"> <property name="orientation">
<widget class="QLabel" name="labelWindowHeight"> <enum>Qt::Vertical</enum>
<property name="text"> </property>
<string>Window height:</string> <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>6</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="labelWindowWidth">
<property name="text">
<string>&amp;Window Size</string>
</property>
<property name="buddy">
<cstring>windowWidthSpinBox</cstring>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSpinBox" name="windowHeightSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65536</number>
</property>
<property name="value">
<number>480</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item>
<widget class="QLabel" name="labelWindowWidth"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Window width:</string> <string>×</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item>
<widget class="QSpinBox" name="windowWidthSpinBox"> <widget class="QSpinBox" name="windowWidthSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string/>
</property>
<property name="minimum"> <property name="minimum">
<number>1</number> <number>1</number>
</property> </property>
@ -131,19 +178,26 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item>
<widget class="QSpinBox" name="windowHeightSpinBox"> <widget class="QLabel" name="label_2">
<property name="minimum"> <property name="text">
<number>1</number> <string>pixels</string>
</property>
<property name="maximum">
<number>65536</number>
</property>
<property name="value">
<number>480</number>
</property> </property>
</widget> </widget>
</item> </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>
</layout> </layout>
</item> </item>
</layout> </layout>
@ -298,7 +352,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>624</width> <width>624</width>
<height>297</height> <height>291</height>
</rect> </rect>
</property> </property>
</widget> </widget>
@ -313,9 +367,6 @@
<layout class="QVBoxLayout" name="verticalLayout_8"> <layout class="QVBoxLayout" name="verticalLayout_8">
<item> <item>
<widget class="QScrollArea" name="scrollArea_2"> <widget class="QScrollArea" name="scrollArea_2">
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="widgetResizable"> <property name="widgetResizable">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -323,9 +374,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>-101</y> <y>0</y>
<width>610</width> <width>610</width>
<height>398</height> <height>501</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QVBoxLayout" name="verticalLayout_7">
@ -369,7 +420,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0"> <item row="4" column="0">
<widget class="QCheckBox" name="useNativeOpenALCheck"> <widget class="QCheckBox" name="useNativeOpenALCheck">
<property name="text"> <property name="text">
<string>Use system installation of OpenAL</string> <string>Use system installation of OpenAL</string>
@ -386,6 +437,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0">
<widget class="QLineEdit" name="lineEditOpenALPath">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="useNativeGLFWCheck"> <widget class="QCheckBox" name="useNativeGLFWCheck">
<property name="text"> <property name="text">
@ -393,14 +451,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="5" column="0">
<widget class="QLineEdit" name="lineEditGLFWPath">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelOpenALPath"> <widget class="QLabel" name="labelOpenALPath">
<property name="text"> <property name="text">
<string>&amp;OpenAL library path</string> <string>&amp;OpenAL library path</string>
@ -410,8 +461,24 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="0">
<widget class="QLineEdit" name="lineEditOpenALPath"> <spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>6</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QLineEdit" name="lineEditGLFWPath">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -513,7 +580,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>624</width> <width>624</width>
<height>297</height> <height>291</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_14"> <layout class="QVBoxLayout" name="verticalLayout_14">
@ -530,24 +597,27 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_15"> <layout class="QVBoxLayout" name="verticalLayout_15">
<item> <item>
<layout class="QGridLayout" name="instanceAccountLayout"> <widget class="QLabel" name="instanceAccountNameLabel">
<item row="0" column="0"> <property name="sizePolicy">
<widget class="QLabel" name="instanceAccountNameLabel"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<property name="sizePolicy"> <horstretch>0</horstretch>
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <verstretch>0</verstretch>
<horstretch>0</horstretch> </sizepolicy>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="text">
</property> <string>Account</string>
<property name="text"> </property>
<string>Account:</string> </widget>
</property> </item>
</widget> <item>
</item> <widget class="QComboBox" name="instanceAccountSelector">
<item row="0" column="1"> <property name="sizePolicy">
<widget class="QComboBox" name="instanceAccountSelector"/> <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
</item> <horstretch>0</horstretch>
</layout> <verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -567,7 +637,7 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QRadioButton" name="serverJoinAddressButton"> <widget class="QRadioButton" name="serverJoinAddressButton">
<property name="text"> <property name="text">
<string>Server address:</string> <string>Server address</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -647,10 +717,7 @@
<tabstops> <tabstops>
<tabstop>openGlobalSettingsButton</tabstop> <tabstop>openGlobalSettingsButton</tabstop>
<tabstop>settingsTabs</tabstop> <tabstop>settingsTabs</tabstop>
<tabstop>scrollArea</tabstop>
<tabstop>maximizedCheckBox</tabstop> <tabstop>maximizedCheckBox</tabstop>
<tabstop>windowWidthSpinBox</tabstop>
<tabstop>windowHeightSpinBox</tabstop>
<tabstop>showGameTime</tabstop> <tabstop>showGameTime</tabstop>
<tabstop>recordGameTime</tabstop> <tabstop>recordGameTime</tabstop>
<tabstop>showGlobalGameTime</tabstop> <tabstop>showGlobalGameTime</tabstop>
@ -664,9 +731,7 @@
<tabstop>scrollArea_2</tabstop> <tabstop>scrollArea_2</tabstop>
<tabstop>onlineFixes</tabstop> <tabstop>onlineFixes</tabstop>
<tabstop>useNativeGLFWCheck</tabstop> <tabstop>useNativeGLFWCheck</tabstop>
<tabstop>lineEditGLFWPath</tabstop>
<tabstop>useNativeOpenALCheck</tabstop> <tabstop>useNativeOpenALCheck</tabstop>
<tabstop>lineEditOpenALPath</tabstop>
<tabstop>perfomanceGroupBox</tabstop> <tabstop>perfomanceGroupBox</tabstop>
<tabstop>enableFeralGamemodeCheck</tabstop> <tabstop>enableFeralGamemodeCheck</tabstop>
<tabstop>enableMangoHud</tabstop> <tabstop>enableMangoHud</tabstop>
@ -674,7 +739,6 @@
<tabstop>useZink</tabstop> <tabstop>useZink</tabstop>
<tabstop>scrollArea_3</tabstop> <tabstop>scrollArea_3</tabstop>
<tabstop>instanceAccountGroupBox</tabstop> <tabstop>instanceAccountGroupBox</tabstop>
<tabstop>instanceAccountSelector</tabstop>
<tabstop>serverJoinGroupBox</tabstop> <tabstop>serverJoinGroupBox</tabstop>
<tabstop>serverJoinAddressButton</tabstop> <tabstop>serverJoinAddressButton</tabstop>
<tabstop>serverJoinAddress</tabstop> <tabstop>serverJoinAddress</tabstop>