diff --git a/gui/main_window.py b/gui/main_window.py index e306d31..6156091 100644 --- a/gui/main_window.py +++ b/gui/main_window.py @@ -18,7 +18,7 @@ from tweaks.tweaks import tweaks from tweaks.custom_gestalt_tweaks import CustomGestaltTweaks, ValueTypeStrings App_Version = "4.2" -App_Build = 5 +App_Build = 6 class Page(Enum): Home = 0 @@ -97,6 +97,8 @@ class MainWindow(QtWidgets.QMainWindow): self.ui.languageLbl.hide() # to be removed later self.ui.languageTxt.textEdited.connect(self.on_languageTxt_textEdited) self.ui.spoofedModelDrp.activated.connect(self.on_spoofedModelDrp_activated) + self.ui.spoofHardwareChk.toggled.connect(self.on_spoofHardwareChk_toggled) + self.ui.spoofCPUChk.toggled.connect(self.on_spoofCPUChk_toggled) ## FEATURE FLAGS PAGE self.ui.clockAnimChk.toggled.connect(self.on_clockAnimChk_toggled) @@ -681,13 +683,13 @@ class MainWindow(QtWidgets.QMainWindow): if not self.device_manager.show_all_spoofable_models and not self.device_manager.get_current_device_model().startswith("iPhone"): # offset the index for ipads idx_to_apply += 6 - tweaks["SpoofModel"].set_selected_option(idx_to_apply) - tweaks["SpoofHardware"].set_selected_option(idx_to_apply) - tweaks["SpoofCPU"].set_selected_option(idx_to_apply) - if index == 0: - tweaks["SpoofModel"].set_enabled(False) - tweaks["SpoofHardware"].set_enabled(False) - tweaks["SpoofCPU"].set_enabled(False) + tweaks["SpoofModel"].set_selected_option(idx_to_apply, is_enabled=(index != 0)) + tweaks["SpoofHardware"].set_selected_option(idx_to_apply, is_enabled=(index != 0 and self.ui.spoofHardwareChk.isChecked())) + tweaks["SpoofCPU"].set_selected_option(idx_to_apply, is_enabled=(index != 0 and self.ui.spoofCPUChk.isChecked())) + def on_spoofHardwareChk_toggled(self, checked: bool): + tweaks["SpoofHardware"].set_enabled(checked and tweaks["SpoofHardware"].selected_option != 0) + def on_spoofCPUChk_toggled(self, checked: bool): + tweaks["SpoofCPU"].set_enabled(checked and tweaks["SpoofCPU"].selected_option != 0) ## SPRINGBOARD OPTIONS PAGE diff --git a/qt/mainwindow.ui b/qt/mainwindow.ui index 5a30af8..de72aa2 100644 --- a/qt/mainwindow.ui +++ b/qt/mainwindow.ui @@ -2598,62 +2598,86 @@ Only works on iOS 18.0 beta 1-2. - - - false + + + Qt::ScrollBarAsNeeded - - - 0 + + Qt::ScrollBarAlwaysOff + + + QAbstractScrollArea::AdjustIgnored + + + true + + + + + 0 + -129 + 660 + 573 + - - 0 - - - 0 - - - 0 - - - - - - 0 + + + + + false - - 0 - - - 0 - - - 0 - - - - - Enable EU Enabler - - - - - - - Method Type - - - - - - - - 150 - 16777215 - - - - QComboBox { + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Enable EU Enabler + + + + + + + Method Type + + + + + + + + 150 + 16777215 + + + + QComboBox { background-color: #3b3b3b; border: none; color: #e8e8e8; @@ -2685,141 +2709,141 @@ QComboBox QAbstractItemView::item:hover { background-color: #535353; color: #ffffff; } - - - - Method 1 - - - - - Method 2 - - - - - - - - Region Code (Should be 2 letters) - - - - - - - Region Code (Default: US) - - - - - - - false - - - QFrame { + + + + Method 1 + + + + + Method 2 + + + + + + + + Region Code (Should be 2 letters) + + + + + + + Region Code (Default: US) + + + + + + + false + + + QFrame { color: #414141; } - - - QFrame::Plain - - - Qt::Horizontal - - - - - - - - - - - -1 - true - - - - ! You will need a MobileGestalt file for this feature. Please select it in the Apply page ! - - - - - - - Enable Apple Intelligence (for Unsupported Devices) - - - - - - - - 0 - - - 5 - - - 0 - - - 5 - - - - - Enable Eligibility File - - - - - - - Language Code (not needed for English) - - - - - - - Language Code (i.e. en) - - - - - - - QFrame { + + + QFrame::Plain + + + Qt::Horizontal + + + + + + + + + + + -1 + true + + + + ! You will need a MobileGestalt file for this feature. Please select it in the Apply page ! + + + + + + + Enable Apple Intelligence (for Unsupported Devices) + + + + + + + + 0 + + + 5 + + + 0 + + + 5 + + + + + Enable Eligibility File + + + + + + + Language Code (not needed for English) + + + + + + + Language Code (i.e. en) + + + + + + + QFrame { color: #414141; } - - - QFrame::Plain - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - In order to download the AI models, you must spoof your device model. However, this may break + + + QFrame::Plain + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + In order to download the AI models, you must spoof your device model. However, this may break Face ID until you revert back. WARNING: Do not go to the Apple Intelligence menu in the Settings app after unspoofing. @@ -2828,32 +2852,32 @@ Entering the menu on your original device model will cause a re-download and may restore to fix. Furthermore, if you switch between model groups, like spoofing from the iPhone 16s to the iPhone 15 Pro series, a re-download may also occur. Please be careful! - - - Qt::AutoText - - - false - - - - - - - Spoofed Device Model - - - - - - - - 325 - 16777215 - - - - QComboBox { + + + Qt::AutoText + + + false + + + + + + + Spoofed Device Model + + + + + + + + 325 + 16777215 + + + + QComboBox { background-color: #3b3b3b; border: none; color: #e8e8e8; @@ -2885,167 +2909,197 @@ QComboBox QAbstractItemView::item:hover { background-color: #535353; color: #ffffff; } - - - Original - - - 0 - - - - Original + + + Original + + + 0 + + + + Original + + + + + iPhone 15 Pro (iPhone16,1) + + + + + iPhone 15 Pro Max (iPhone16,2) + + + + + iPhone 16 (iPhone17,3) + + + + + iPhone 16 Plus (iPhone17,4) + + + + + iPhone 16 Pro (iPhone17,1) + + + + + iPhone 16 Pro Max (iPhone17,2) + + + + + iPad Mini (A17 Pro) (W) (iPad16,1) + + + + + iPad Mini (A17 Pro) (C) (iPad16,2) + + + + + iPad Pro (13-inch) (M4) (W) (iPad16,5) + + + + + iPad Pro (13-inch) (M4) (C) (iPad16,6) + + + + + iPad Pro (11-inch) (M4) (W) (iPad16,3) + + + + + iPad Pro (11-inch) (M4) (C) (iPad16,4) + + + + + iPad Pro (12.9-inch) (M2) (W) (iPad14,5) + + + + + iPad Pro (12.9-inch) (M2) (C) (iPad14,6) + + + + + iPad Pro (11-inch) (M2) (W) (iPad14,3) + + + + + iPad Pro (11-inch) (M2) (C) (iPad14,4) + + + + + iPad Air (13-inch) (M2) (W) (iPad14,10) + + + + + iPad Air (13-inch) (M2) (C) (iPad14,11) + + + + + iPad Air (11-inch) (M2) (W) (iPad14,8) + + + + + iPad Air (11-inch) (M2) (C) (iPad14,9) + + + + + iPad Pro (11-inch) (M1) (W) (iPad13,4) + + + + + iPad Pro (11-inch) (M1) (C) (iPad13,5) + + + + + iPad Pro (12.9-inch) (M1) (W) (iPad13,8) + + + + + iPad Pro (12.9-inch) (M1) (C) (iPad13,9) + + + + + iPad Air (M1) (W) (iPad13,16) + + + + + iPad Air (M1) (C) (iPad13,17) + + + + + + + + Spoofs the device hardware model (ie D83AP) + + + Spoof Hardware Model + + + true + + + + + + + Spoofs the device CPU model (ie t8130) + + + Spoof CPU Model + + + true + + + + + + + + + + Qt::Vertical - - - - iPhone 15 Pro (iPhone16,1) + + + 20 + 40 + - - - - iPhone 15 Pro Max (iPhone16,2) - - - - - iPhone 16 (iPhone17,3) - - - - - iPhone 16 Plus (iPhone17,4) - - - - - iPhone 16 Pro (iPhone17,1) - - - - - iPhone 16 Pro Max (iPhone17,2) - - - - - iPad Mini (A17 Pro) (W) (iPad16,1) - - - - - iPad Mini (A17 Pro) (C) (iPad16,2) - - - - - iPad Pro (13-inch) (M4) (W) (iPad16,5) - - - - - iPad Pro (13-inch) (M4) (C) (iPad16,6) - - - - - iPad Pro (11-inch) (M4) (W) (iPad16,3) - - - - - iPad Pro (11-inch) (M4) (C) (iPad16,4) - - - - - iPad Pro (12.9-inch) (M2) (W) (iPad14,5) - - - - - iPad Pro (12.9-inch) (M2) (C) (iPad14,6) - - - - - iPad Pro (11-inch) (M2) (W) (iPad14,3) - - - - - iPad Pro (11-inch) (M2) (C) (iPad14,4) - - - - - iPad Air (13-inch) (M2) (W) (iPad14,10) - - - - - iPad Air (13-inch) (M2) (C) (iPad14,11) - - - - - iPad Air (11-inch) (M2) (W) (iPad14,8) - - - - - iPad Air (11-inch) (M2) (C) (iPad14,9) - - - - - iPad Pro (11-inch) (M1) (W) (iPad13,4) - - - - - iPad Pro (11-inch) (M1) (C) (iPad13,5) - - - - - iPad Pro (12.9-inch) (M1) (W) (iPad13,8) - - - - - iPad Pro (12.9-inch) (M1) (C) (iPad13,9) - - - - - iPad Air (M1) (W) (iPad13,16) - - - - - iPad Air (M1) (C) (iPad13,17) - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + + + + + diff --git a/qt/mainwindow_ui.py b/qt/mainwindow_ui.py index 6fbd52d..9d13708 100644 --- a/qt/mainwindow_ui.py +++ b/qt/mainwindow_ui.py @@ -15,10 +15,11 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont, QFontDatabase, QGradient, QIcon, QImage, QKeySequence, QLinearGradient, QPainter, QPalette, QPixmap, QRadialGradient, QTransform) -from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QFrame, - QHBoxLayout, QLabel, QLineEdit, QMainWindow, - QProgressBar, QScrollArea, QSizePolicy, QSpacerItem, - QStackedWidget, QToolButton, QVBoxLayout, QWidget) +from PySide6.QtWidgets import (QAbstractScrollArea, QApplication, QCheckBox, QComboBox, + QFrame, QHBoxLayout, QLabel, QLineEdit, + QMainWindow, QProgressBar, QScrollArea, QSizePolicy, + QSpacerItem, QStackedWidget, QToolButton, QVBoxLayout, + QWidget) import resources_rc class Ui_Nugget(object): @@ -1386,7 +1387,18 @@ class Ui_Nugget(object): self.verticalLayout_17.addWidget(self.line_13) - self.euEnablerPageContent = QWidget(self.euEnablerPage) + self.scrollArea_2 = QScrollArea(self.euEnablerPage) + self.scrollArea_2.setObjectName(u"scrollArea_2") + self.scrollArea_2.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded) + self.scrollArea_2.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self.scrollArea_2.setSizeAdjustPolicy(QAbstractScrollArea.AdjustIgnored) + self.scrollArea_2.setWidgetResizable(True) + self.scrollAreaWidgetContents_2 = QWidget() + self.scrollAreaWidgetContents_2.setObjectName(u"scrollAreaWidgetContents_2") + self.scrollAreaWidgetContents_2.setGeometry(QRect(0, -129, 660, 573)) + self.verticalLayout_37 = QVBoxLayout(self.scrollAreaWidgetContents_2) + self.verticalLayout_37.setObjectName(u"verticalLayout_37") + self.euEnablerPageContent = QWidget(self.scrollAreaWidgetContents_2) self.euEnablerPageContent.setObjectName(u"euEnablerPageContent") self.euEnablerPageContent.setEnabled(False) self.verticalLayout_16 = QVBoxLayout(self.euEnablerPageContent) @@ -1592,6 +1604,18 @@ class Ui_Nugget(object): self.verticalLayout_34.addWidget(self.spoofedModelDrp) + self.spoofHardwareChk = QCheckBox(self.aiEnablerContent) + self.spoofHardwareChk.setObjectName(u"spoofHardwareChk") + self.spoofHardwareChk.setChecked(True) + + self.verticalLayout_34.addWidget(self.spoofHardwareChk) + + self.spoofCPUChk = QCheckBox(self.aiEnablerContent) + self.spoofCPUChk.setObjectName(u"spoofCPUChk") + self.spoofCPUChk.setChecked(True) + + self.verticalLayout_34.addWidget(self.spoofCPUChk) + self.verticalLayout_16.addWidget(self.aiEnablerContent) @@ -1600,7 +1624,11 @@ class Ui_Nugget(object): self.verticalLayout_16.addItem(self.verticalSpacer_7) - self.verticalLayout_17.addWidget(self.euEnablerPageContent) + self.verticalLayout_37.addWidget(self.euEnablerPageContent) + + self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2) + + self.verticalLayout_17.addWidget(self.scrollArea_2) self.pages.addWidget(self.euEnablerPage) self.springboardOptionsPage = QWidget() @@ -3281,6 +3309,14 @@ class Ui_Nugget(object): self.spoofedModelDrp.setItemText(26, QCoreApplication.translate("Nugget", u"iPad Air (M1) (C) (iPad13,17)", None)) self.spoofedModelDrp.setCurrentText(QCoreApplication.translate("Nugget", u"Original", None)) +#if QT_CONFIG(tooltip) + self.spoofHardwareChk.setToolTip(QCoreApplication.translate("Nugget", u"Spoofs the device hardware model (ie D83AP)", None)) +#endif // QT_CONFIG(tooltip) + self.spoofHardwareChk.setText(QCoreApplication.translate("Nugget", u"Spoof Hardware Model", None)) +#if QT_CONFIG(tooltip) + self.spoofCPUChk.setToolTip(QCoreApplication.translate("Nugget", u"Spoofs the device CPU model (ie t8130)", None)) +#endif // QT_CONFIG(tooltip) + self.spoofCPUChk.setText(QCoreApplication.translate("Nugget", u"Spoof CPU Model", None)) self.springboardOptionsLbl.setText(QCoreApplication.translate("Nugget", u"Springboard Options", None)) self.label_13.setText(QCoreApplication.translate("Nugget", u"Lock Screen Footnote Text", None)) self.footnoteTxt.setPlaceholderText(QCoreApplication.translate("Nugget", u"Footnote Text", None)) diff --git a/qt/ui_mainwindow.py b/qt/ui_mainwindow.py index 681d2d7..069a288 100644 --- a/qt/ui_mainwindow.py +++ b/qt/ui_mainwindow.py @@ -15,10 +15,11 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont, QFontDatabase, QGradient, QIcon, QImage, QKeySequence, QLinearGradient, QPainter, QPalette, QPixmap, QRadialGradient, QTransform) -from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QFrame, - QHBoxLayout, QLabel, QLineEdit, QMainWindow, - QProgressBar, QScrollArea, QSizePolicy, QSpacerItem, - QStackedWidget, QToolButton, QVBoxLayout, QWidget) +from PySide6.QtWidgets import (QAbstractScrollArea, QApplication, QCheckBox, QComboBox, + QFrame, QHBoxLayout, QLabel, QLineEdit, + QMainWindow, QProgressBar, QScrollArea, QSizePolicy, + QSpacerItem, QStackedWidget, QToolButton, QVBoxLayout, + QWidget) import resources_rc class Ui_Nugget(object): @@ -1386,7 +1387,18 @@ class Ui_Nugget(object): self.verticalLayout_17.addWidget(self.line_13) - self.euEnablerPageContent = QWidget(self.euEnablerPage) + self.scrollArea_2 = QScrollArea(self.euEnablerPage) + self.scrollArea_2.setObjectName(u"scrollArea_2") + self.scrollArea_2.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded) + self.scrollArea_2.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self.scrollArea_2.setSizeAdjustPolicy(QAbstractScrollArea.AdjustIgnored) + self.scrollArea_2.setWidgetResizable(True) + self.scrollAreaWidgetContents_2 = QWidget() + self.scrollAreaWidgetContents_2.setObjectName(u"scrollAreaWidgetContents_2") + self.scrollAreaWidgetContents_2.setGeometry(QRect(0, -129, 660, 573)) + self.verticalLayout_37 = QVBoxLayout(self.scrollAreaWidgetContents_2) + self.verticalLayout_37.setObjectName(u"verticalLayout_37") + self.euEnablerPageContent = QWidget(self.scrollAreaWidgetContents_2) self.euEnablerPageContent.setObjectName(u"euEnablerPageContent") self.euEnablerPageContent.setEnabled(False) self.verticalLayout_16 = QVBoxLayout(self.euEnablerPageContent) @@ -1592,6 +1604,18 @@ class Ui_Nugget(object): self.verticalLayout_34.addWidget(self.spoofedModelDrp) + self.spoofHardwareChk = QCheckBox(self.aiEnablerContent) + self.spoofHardwareChk.setObjectName(u"spoofHardwareChk") + self.spoofHardwareChk.setChecked(True) + + self.verticalLayout_34.addWidget(self.spoofHardwareChk) + + self.spoofCPUChk = QCheckBox(self.aiEnablerContent) + self.spoofCPUChk.setObjectName(u"spoofCPUChk") + self.spoofCPUChk.setChecked(True) + + self.verticalLayout_34.addWidget(self.spoofCPUChk) + self.verticalLayout_16.addWidget(self.aiEnablerContent) @@ -1600,7 +1624,11 @@ class Ui_Nugget(object): self.verticalLayout_16.addItem(self.verticalSpacer_7) - self.verticalLayout_17.addWidget(self.euEnablerPageContent) + self.verticalLayout_37.addWidget(self.euEnablerPageContent) + + self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2) + + self.verticalLayout_17.addWidget(self.scrollArea_2) self.pages.addWidget(self.euEnablerPage) self.springboardOptionsPage = QWidget() @@ -3281,6 +3309,14 @@ class Ui_Nugget(object): self.spoofedModelDrp.setItemText(26, QCoreApplication.translate("Nugget", u"iPad Air (M1) (C) (iPad13,17)", None)) self.spoofedModelDrp.setCurrentText(QCoreApplication.translate("Nugget", u"Original", None)) +#if QT_CONFIG(tooltip) + self.spoofHardwareChk.setToolTip(QCoreApplication.translate("Nugget", u"Spoofs the device hardware model (ie D83AP)", None)) +#endif // QT_CONFIG(tooltip) + self.spoofHardwareChk.setText(QCoreApplication.translate("Nugget", u"Spoof Hardware Model", None)) +#if QT_CONFIG(tooltip) + self.spoofCPUChk.setToolTip(QCoreApplication.translate("Nugget", u"Spoofs the device CPU model (ie t8130)", None)) +#endif // QT_CONFIG(tooltip) + self.spoofCPUChk.setText(QCoreApplication.translate("Nugget", u"Spoof CPU Model", None)) self.springboardOptionsLbl.setText(QCoreApplication.translate("Nugget", u"Springboard Options", None)) self.label_13.setText(QCoreApplication.translate("Nugget", u"Lock Screen Footnote Text", None)) self.footnoteTxt.setPlaceholderText(QCoreApplication.translate("Nugget", u"Footnote Text", None)) diff --git a/tweaks/tweak_classes.py b/tweaks/tweak_classes.py index 15b6a61..85ad92b 100644 --- a/tweaks/tweak_classes.py +++ b/tweaks/tweak_classes.py @@ -220,9 +220,9 @@ class MobileGestaltPickerTweak(Tweak): plist["CacheExtra"][self.key][self.subkey] = new_value return plist - def set_selected_option(self, new_option: int): + def set_selected_option(self, new_option: int, is_enabled: bool = True): self.selected_option = new_option - self.enabled = True + self.enabled = is_enabled def get_selected_option(self) -> int: return self.selected_option