mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-28 21:00:20 +02:00
Make requested changes
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
68bf409a98
commit
5a76d9b7e1
@ -63,9 +63,6 @@ JavaPage::JavaPage(QWidget* parent) : QWidget(parent), ui(new Ui::JavaPage)
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
m_javaSettings = new JavaSettingsWidget(nullptr, this);
|
|
||||||
ui->generalScrollArea->setWidget(m_javaSettings);
|
|
||||||
|
|
||||||
if (BuildConfig.JAVA_DOWNLOADER_ENABLED) {
|
if (BuildConfig.JAVA_DOWNLOADER_ENABLED) {
|
||||||
ui->managedJavaList->initialize(new JavaInstallList(this, true));
|
ui->managedJavaList->initialize(new JavaInstallList(this, true));
|
||||||
ui->managedJavaList->setResizeOn(2);
|
ui->managedJavaList->setResizeOn(2);
|
||||||
@ -88,7 +85,7 @@ void JavaPage::retranslate()
|
|||||||
|
|
||||||
bool JavaPage::apply()
|
bool JavaPage::apply()
|
||||||
{
|
{
|
||||||
m_javaSettings->saveSettings();
|
ui->javaSettings->saveSettings();
|
||||||
JavaCommon::checkJVMArgs(APPLICATION->settings()->get("JvmArgs").toString(), this);
|
JavaCommon::checkJVMArgs(APPLICATION->settings()->get("JvmArgs").toString(), this);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -71,5 +71,4 @@ class JavaPage : public QWidget, public BasePage {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::JavaPage* ui;
|
Ui::JavaPage* ui;
|
||||||
JavaSettingsWidget* m_javaSettings;
|
|
||||||
};
|
};
|
||||||
|
@ -53,6 +53,11 @@
|
|||||||
<height>610</height>
|
<height>610</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="JavaSettingsWidget" name="javaSettings" native="true"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -146,6 +151,12 @@
|
|||||||
<header>ui/widgets/VersionSelectWidget.h</header>
|
<header>ui/widgets/VersionSelectWidget.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>JavaSettingsWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>ui/widgets/JavaSettingsWidget.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>562</width>
|
<width>511</width>
|
||||||
<height>726</height>
|
<height>726</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<enum>QTabWidget::Rounded</enum>
|
<enum>QTabWidget::Rounded</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="featuresTab">
|
<widget class="QWidget" name="featuresTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -58,8 +58,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>570</width>
|
<width>473</width>
|
||||||
<height>692</height>
|
<height>770</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
@ -689,4 +689,4 @@
|
|||||||
<buttongroups>
|
<buttongroups>
|
||||||
<buttongroup name="sortingModeGroup"/>
|
<buttongroup name="sortingModeGroup"/>
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
@ -36,21 +36,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "JavaSettingsWidget.h"
|
#include "JavaSettingsWidget.h"
|
||||||
#include <Application.h>
|
|
||||||
#include <BuildConfig.h>
|
|
||||||
#include <JavaCommon.h>
|
|
||||||
#include <settings/Setting.h>
|
|
||||||
#include <ui/java/InstallJavaDialog.h>
|
|
||||||
|
|
||||||
#include <FileSystem.h>
|
|
||||||
#include <java/JavaInstallList.h>
|
|
||||||
#include <java/JavaUtils.h>
|
|
||||||
#include <sys.h>
|
|
||||||
#include <ui/dialogs/CustomMessageBox.h>
|
|
||||||
#include <ui/dialogs/VersionSelectDialog.h>
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <memory>
|
#include "Application.h"
|
||||||
|
#include "BuildConfig.h"
|
||||||
|
#include "FileSystem.h"
|
||||||
|
#include "JavaCommon.h"
|
||||||
|
#include "java/JavaInstallList.h"
|
||||||
|
#include "java/JavaUtils.h"
|
||||||
|
#include "settings/Setting.h"
|
||||||
|
#include "sys.h"
|
||||||
|
#include "ui/dialogs/CustomMessageBox.h"
|
||||||
|
#include "ui/dialogs/VersionSelectDialog.h"
|
||||||
|
#include "ui/java/InstallJavaDialog.h"
|
||||||
|
|
||||||
#include "ui_JavaSettingsWidget.h"
|
#include "ui_JavaSettingsWidget.h"
|
||||||
|
|
||||||
|
@ -36,9 +36,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <BaseInstance.h>
|
|
||||||
#include <JavaCommon.h>
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include "BaseInstance.h"
|
||||||
|
#include "JavaCommon.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class JavaSettingsWidget;
|
class JavaSettingsWidget;
|
||||||
@ -48,6 +48,7 @@ class JavaSettingsWidget : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
explicit JavaSettingsWidget(QWidget* parent = nullptr) : JavaSettingsWidget(nullptr, nullptr) {}
|
||||||
explicit JavaSettingsWidget(InstancePtr instance, QWidget* parent = nullptr);
|
explicit JavaSettingsWidget(InstancePtr instance, QWidget* parent = nullptr);
|
||||||
~JavaSettingsWidget() override;
|
~JavaSettingsWidget() override;
|
||||||
|
|
||||||
|
@ -50,13 +50,11 @@ MinecraftSettingsWidget::MinecraftSettingsWidget(MinecraftInstancePtr instance,
|
|||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
if (m_instance == nullptr) {
|
if (m_instance == nullptr) {
|
||||||
for (int i = 0; i < m_ui->settingsTabs->count(); ++i) {
|
for (int i = m_ui->settingsTabs->count() - 1; i >= 0; --i) {
|
||||||
const QString name = m_ui->settingsTabs->widget(i)->objectName();
|
const QString name = m_ui->settingsTabs->widget(i)->objectName();
|
||||||
|
|
||||||
if (name == "javaPage" || name == "launchPage") {
|
if (name == "javaPage" || name == "launchPage")
|
||||||
m_ui->settingsTabs->removeTab(i);
|
m_ui->settingsTabs->removeTab(i);
|
||||||
--i;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ui->openGlobalSettingsButton->setVisible(false);
|
m_ui->openGlobalSettingsButton->setVisible(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user