mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-09-02 13:09:22 +00:00
NOISSUE Use MiB suffix for Java memory options
This commit is contained in:
parent
27d3ae145a
commit
d8598d6901
@ -37,8 +37,8 @@ JavaPage::JavaPage(QWidget *parent) : QWidget(parent), ui(new Ui::JavaPage)
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->tabWidget->tabBar()->hide();
|
ui->tabWidget->tabBar()->hide();
|
||||||
|
|
||||||
auto sysMB = Sys::getSystemRam() / Sys::megabyte;
|
auto sysMiB = Sys::getSystemRam() / Sys::mebibyte;
|
||||||
ui->maxMemSpinBox->setMaximum(sysMB);
|
ui->maxMemSpinBox->setMaximum(sysMiB);
|
||||||
loadSettings();
|
loadSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
<string>The maximum amount of memory Minecraft is allowed to use.</string>
|
<string>The maximum amount of memory Minecraft is allowed to use.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string notr="true"> MB</string>
|
<string notr="true"> MiB</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>128</number>
|
<number>128</number>
|
||||||
@ -87,7 +87,7 @@
|
|||||||
<string>The amount of memory Minecraft is started with.</string>
|
<string>The amount of memory Minecraft is started with.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string notr="true"> MB</string>
|
<string notr="true"> MiB</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>128</number>
|
<number>128</number>
|
||||||
@ -116,7 +116,7 @@
|
|||||||
<string>The amount of memory available to store loaded Java classes.</string>
|
<string>The amount of memory available to store loaded Java classes.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string notr="true"> MB</string>
|
<string notr="true"> MiB</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>64</number>
|
<number>64</number>
|
||||||
|
@ -19,7 +19,7 @@ InstanceSettingsPage::InstanceSettingsPage(BaseInstance *inst, QWidget *parent)
|
|||||||
{
|
{
|
||||||
m_settings = inst->settings();
|
m_settings = inst->settings();
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
auto sysMB = Sys::getSystemRam() / Sys::megabyte;
|
auto sysMB = Sys::getSystemRam() / Sys::mebibyte;
|
||||||
ui->maxMemSpinBox->setMaximum(sysMB);
|
ui->maxMemSpinBox->setMaximum(sysMB);
|
||||||
connect(ui->openGlobalJavaSettingsButton, &QCommandLinkButton::clicked, this, &InstanceSettingsPage::globalSettingsButtonClicked);
|
connect(ui->openGlobalJavaSettingsButton, &QCommandLinkButton::clicked, this, &InstanceSettingsPage::globalSettingsButtonClicked);
|
||||||
connect(MMC, &MultiMC::globalSettingsAboutToOpen, this, &InstanceSettingsPage::applySettings);
|
connect(MMC, &MultiMC::globalSettingsAboutToOpen, this, &InstanceSettingsPage::applySettings);
|
||||||
|
@ -116,7 +116,7 @@
|
|||||||
<string>The maximum amount of memory Minecraft is allowed to use.</string>
|
<string>The maximum amount of memory Minecraft is allowed to use.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string notr="true"> MB</string>
|
<string notr="true"> MiB</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>128</number>
|
<number>128</number>
|
||||||
@ -138,7 +138,7 @@
|
|||||||
<string>The amount of memory Minecraft is started with.</string>
|
<string>The amount of memory Minecraft is started with.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string notr="true"> MB</string>
|
<string notr="true"> MiB</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>128</number>
|
<number>128</number>
|
||||||
@ -160,7 +160,7 @@
|
|||||||
<string>The amount of memory available to store loaded Java classes.</string>
|
<string>The amount of memory available to store loaded Java classes.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string notr="true"> MB</string>
|
<string notr="true"> MiB</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>64</number>
|
<number>64</number>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
JavaSettingsWidget::JavaSettingsWidget(QWidget* parent) : QWidget(parent)
|
JavaSettingsWidget::JavaSettingsWidget(QWidget* parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
m_availableMemory = Sys::getSystemRam() / Sys::megabyte;
|
m_availableMemory = Sys::getSystemRam() / Sys::mebibyte;
|
||||||
|
|
||||||
goodIcon = MMC->getThemedIcon("status-good");
|
goodIcon = MMC->getThemedIcon("status-good");
|
||||||
yellowIcon = MMC->getThemedIcon("status-yellow");
|
yellowIcon = MMC->getThemedIcon("status-yellow");
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
namespace Sys
|
namespace Sys
|
||||||
{
|
{
|
||||||
const uint64_t megabyte = 1024ull * 1024ull;
|
const uint64_t mebibyte = 1024ull * 1024ull;
|
||||||
struct KernelInfo
|
struct KernelInfo
|
||||||
{
|
{
|
||||||
QString kernelName;
|
QString kernelName;
|
||||||
|
Loading…
Reference in New Issue
Block a user