Compare commits

...

6 commits

Author SHA1 Message Date
4d02c4ef5b remove drm 2025-08-10 02:47:49 +05:00
639d2e95af remove dbus support 2025-08-10 02:47:49 +05:00
TheKodeToad
8275529afb
A few tweaks to new ui (#4033) 2025-08-05 10:44:57 +01:00
TheKodeToad
6abd7ac673
Remove invisible GroupBoxes (they appear on Fusion)
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2025-08-04 10:22:25 +01:00
TheKodeToad
99f6a02a14
Cat Fit -> Cat Scaling
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2025-08-03 12:14:03 +01:00
TheKodeToad
6ab1a246cb
Use radio buttons for Instance Renaming Mode
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2025-08-03 12:09:10 +01:00
8 changed files with 102 additions and 141 deletions

View file

@ -324,8 +324,6 @@ include(QtVersionlessBackport)
if(Launcher_QT_VERSION_MAJOR EQUAL 6)
set(QT_VERSION_MAJOR 6)
find_package(Qt6 REQUIRED COMPONENTS Core CoreTools Widgets Concurrent Network Test Xml Core5Compat NetworkAuth OpenGL)
find_package(Qt6 COMPONENTS DBus)
list(APPEND Launcher_QT_DBUS Qt6::DBus)
list(APPEND Launcher_QT_LIBS Qt6::Core5Compat)
if(NOT Launcher_FORCE_BUNDLED_LIBS)

View file

@ -1344,7 +1344,6 @@ target_link_libraries(Launcher_logic
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::NetworkAuth
Qt${QT_VERSION_MAJOR}::OpenGL
${Launcher_QT_DBUS}
${Launcher_QT_LIBS}
)
target_link_libraries(Launcher_logic
@ -1353,10 +1352,6 @@ target_link_libraries(Launcher_logic
LocalPeer
Launcher_rainbow
)
if (TARGET ${Launcher_QT_DBUS})
add_compile_definitions(WITH_QTDBUS)
endif()
if(APPLE)
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks/")

View file

@ -99,10 +99,6 @@
#include "MangoHud.h"
#endif
#ifdef WITH_QTDBUS
#include <QtDBus/QtDBus>
#endif
#define IBUS "@im=ibus"
[[maybe_unused]] static bool switcherooSetupGPU(QProcessEnvironment& env)
@ -687,14 +683,12 @@ QProcessEnvironment MinecraftInstance::createLaunchEnvironment()
}
if (settings()->get("UseDiscreteGpu").toBool()) {
if (!switcherooSetupGPU(env)) {
// Open Source Drivers
env.insert("DRI_PRIME", "1");
// Proprietary Nvidia Drivers
env.insert("__NV_PRIME_RENDER_OFFLOAD", "1");
env.insert("__VK_LAYER_NV_optimus", "NVIDIA_only");
env.insert("__GLX_VENDOR_LIBRARY_NAME", "nvidia");
}
// Open Source Drivers
env.insert("DRI_PRIME", "1");
// Proprietary Nvidia Drivers
env.insert("__NV_PRIME_RENDER_OFFLOAD", "1");
env.insert("__VK_LAYER_NV_optimus", "NVIDIA_only");
env.insert("__GLX_VENDOR_LIBRARY_NAME", "nvidia");
}
if (settings()->get("UseZink").toBool()) {

View file

@ -116,7 +116,7 @@ class MinecraftAccount : public QObject, public Usable {
AccountType accountType() const noexcept { return data.type; }
bool ownsMinecraft() const { return data.type != AccountType::Offline && data.minecraftEntitlement.ownsMinecraft; }
bool ownsMinecraft() const { return true; }
bool hasProfile() const { return data.profileId().size() != 0; }

View file

@ -141,14 +141,6 @@ void AccountListPage::on_actionAddMicrosoft_triggered()
void AccountListPage::on_actionAddOffline_triggered()
{
if (!m_accounts->anyAccountIsValid()) {
QMessageBox::warning(this, tr("Error"),
tr("You must add a Microsoft account that owns Minecraft before you can add an offline account."
"<br><br>"
"If you have lost your account you can contact Microsoft for support."));
return;
}
MinecraftAccountPtr account =
OfflineLoginDialog::newAccount(this, tr("Please enter your desired username to add your offline account."));

View file

@ -65,15 +65,6 @@ enum InstSortMode {
Sort_LastLaunch
};
enum InstRenamingMode {
// Rename metadata only.
Rename_Always,
// Ask everytime.
Rename_Ask,
// Rename physical directory too.
Rename_Never
};
LauncherPage::LauncherPage(QWidget* parent) : QWidget(parent), ui(new Ui::LauncherPage)
{
ui->setupUi(this);
@ -242,18 +233,12 @@ void LauncherPage::applySettings()
break;
}
auto renamingMode = (InstRenamingMode)ui->renamingBehaviorComboBox->currentIndex();
switch (renamingMode) {
case Rename_Always:
s->set("InstRenamingMode", "MetadataOnly");
break;
case Rename_Never:
s->set("InstRenamingMode", "PhysicalDir");
break;
case Rename_Ask:
default:
s->set("InstRenamingMode", "AskEverytime");
break;
if (ui->askToRenameDirBtn->isChecked()) {
s->set("InstRenamingMode", "AskEverytime");
} else if (ui->alwaysRenameDirBtn->isChecked()) {
s->set("InstRenamingMode", "PhysicalDir");
} else if (ui->neverRenameDirBtn->isChecked()) {
s->set("InstRenamingMode", "MetadataOnly");
}
// Mods
@ -300,15 +285,9 @@ void LauncherPage::loadSettings()
}
QString renamingMode = s->get("InstRenamingMode").toString();
InstRenamingMode renamingModeEnum;
if (renamingMode == "MetadataOnly") {
renamingModeEnum = Rename_Always;
} else if (renamingMode == "PhysicalDir") {
renamingModeEnum = Rename_Never;
} else {
renamingModeEnum = Rename_Ask;
}
ui->renamingBehaviorComboBox->setCurrentIndex(renamingModeEnum);
ui->askToRenameDirBtn->setChecked(renamingMode == "AskEverytime");
ui->alwaysRenameDirBtn->setChecked(renamingMode == "PhysicalDir");
ui->neverRenameDirBtn->setChecked(renamingMode == "MetadataOnly");
// Mods
ui->metadataEnableBtn->setChecked(!s->get("ModMetadataDisabled").toBool());

View file

@ -32,7 +32,7 @@
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
<enum>Qt::ScrollBarPolicy::ScrollBarAsNeeded</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
@ -41,9 +41,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-356</y>
<width>742</width>
<height>1148</height>
<y>0</y>
<width>746</width>
<height>1194</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
@ -86,10 +86,10 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<enum>QSizePolicy::Policy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -107,37 +107,42 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="renamingBehaviorComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<widget class="QRadioButton" name="askToRenameDirBtn">
<property name="text">
<string>Ask what to do</string>
</property>
<item>
<property name="text">
<string>Ask what to do with the folder</string>
</property>
</item>
<item>
<property name="text">
<string>Always rename the folder</string>
</property>
</item>
<item>
<property name="text">
<string>Never rename the folder—only the displayed name</string>
</property>
</item>
<attribute name="buttonGroup">
<string notr="true">renamingBehaviorGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="alwaysRenameDirBtn">
<property name="text">
<string>Always rename the folder</string>
</property>
<attribute name="buttonGroup">
<string notr="true">renamingBehaviorGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="neverRenameDirBtn">
<property name="text">
<string>Never rename the folder</string>
</property>
<attribute name="buttonGroup">
<string notr="true">renamingBehaviorGroup</string>
</attribute>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<enum>QSizePolicy::Policy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -206,7 +211,7 @@
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -433,7 +438,7 @@
</property>
<layout class="QFormLayout" name="formLayout">
<property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="lineLimitLabel">
@ -602,7 +607,7 @@
<item row="0" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -618,7 +623,7 @@
<item>
<spacer name="verticalSpacer_FeaturesTab">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -636,9 +641,6 @@
</widget>
<tabstops>
<tabstop>scrollArea</tabstop>
<tabstop>sortByNameBtn</tabstop>
<tabstop>sortLastLaunchedBtn</tabstop>
<tabstop>renamingBehaviorComboBox</tabstop>
<tabstop>preferMenuBarCheckBox</tabstop>
<tabstop>autoUpdateCheckBox</tabstop>
<tabstop>updateIntervalSpinBox</tabstop>
@ -670,5 +672,6 @@
<connections/>
<buttongroups>
<buttongroup name="sortingModeGroup"/>
<buttongroup name="renamingBehaviorGroup"/>
</buttongroups>
</ui>

View file

@ -203,53 +203,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="catFitLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Fit</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="catFitComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>77</width>
<height>30</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Fit</string>
</property>
</item>
<item>
<property name="text">
<string>Fill</string>
</property>
</item>
<item>
<property name="text">
<string>Stretch</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="catOpacityLabel">
<property name="text">
@ -370,6 +323,53 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="catFitLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Cat Scaling</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="catFitComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>77</width>
<height>30</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Fit</string>
</property>
</item>
<item>
<property name="text">
<string>Fill</string>
</property>
</item>
<item>
<property name="text">
<string>Stretch</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>