custom gestalt tweaks ui

This commit is contained in:
leminlimez
2024-10-11 20:43:00 -04:00
parent a5ed04b4ad
commit 0eba6ada5e
7 changed files with 3247 additions and 151 deletions

View File

@@ -13,6 +13,7 @@ from devicemanagement.device_manager import DeviceManager
from gui.gestalt_dialog import GestaltDialog from gui.gestalt_dialog import GestaltDialog
from tweaks.tweaks import tweaks from tweaks.tweaks import tweaks
from tweaks.custom_gestalt_tweaks import CustomGestaltTweaks, ValueTypeStrings
class Page(Enum): class Page(Enum):
Home = 0 Home = 0
@@ -144,7 +145,8 @@ class MainWindow(QtWidgets.QMainWindow):
self.ui.internalStorageChk.clicked.connect(self.on_internalStorageChk_clicked) self.ui.internalStorageChk.clicked.connect(self.on_internalStorageChk_clicked)
self.ui.collisionSOSChk.clicked.connect(self.on_collisionSOSChk_clicked) self.ui.collisionSOSChk.clicked.connect(self.on_collisionSOSChk_clicked)
self.ui.aodChk.clicked.connect(self.on_aodChk_clicked) self.ui.aodChk.clicked.connect(self.on_aodChk_clicked)
self.ui.sleepApneaChk.clicked.connect(self.on_sleepApneaChk_clicked)
self.ui.addGestaltKeyBtn.clicked.connect(self.on_addGestaltKeyBtn_clicked)
## GENERAL INTERFACE FUNCTIONS ## GENERAL INTERFACE FUNCTIONS
@@ -238,7 +240,6 @@ class MainWindow(QtWidgets.QMainWindow):
if Version(self.device_manager.data_singleton.current_device.version) >= Version("18.0"): if Version(self.device_manager.data_singleton.current_device.version) >= Version("18.0"):
self.ui.aodChk.show() self.ui.aodChk.show()
self.ui.iphone16SettingsChk.show() self.ui.iphone16SettingsChk.show()
self.ui.sleepApneaChk.show()
self.ui.featureFlagsPageBtn.show() self.ui.featureFlagsPageBtn.show()
# show the other dynamic island options # show the other dynamic island options
self.ui.dynamicIslandDrp.addItem("2622 (iPhone 16 Pro Dynamic Island)") self.ui.dynamicIslandDrp.addItem("2622 (iPhone 16 Pro Dynamic Island)")
@@ -246,7 +247,6 @@ class MainWindow(QtWidgets.QMainWindow):
else: else:
self.ui.aodChk.hide() self.ui.aodChk.hide()
self.ui.iphone16SettingsChk.hide() self.ui.iphone16SettingsChk.hide()
self.ui.sleepApneaChk.hide()
self.ui.featureFlagsPageBtn.hide() self.ui.featureFlagsPageBtn.hide()
else: else:
self.device_manager.set_current_device(index=None) self.device_manager.set_current_device(index=None)
@@ -417,8 +417,55 @@ class MainWindow(QtWidgets.QMainWindow):
tweaks["CollisionSOS"].set_enabled(checked) tweaks["CollisionSOS"].set_enabled(checked)
def on_aodChk_clicked(self, checked: bool): def on_aodChk_clicked(self, checked: bool):
tweaks["AOD"].set_enabled(checked) tweaks["AOD"].set_enabled(checked)
def on_sleepApneaChk_clicked(self, checked: bool):
tweaks["SleepApnea"].set_enabled(checked) def update_custom_gestalt_value_type(self, id, idx, valueField: QtWidgets.QLineEdit):
new_str = CustomGestaltTweaks.set_tweak_value_type(id, idx)
# update the value
valueField.setText(new_str)
def on_addGestaltKeyBtn_clicked(self):
# create a blank gestalt value with default value of 1
key_identifier = CustomGestaltTweaks.create_tweak()
widget = QtWidgets.QWidget()
widget.setFixedHeight(35)
widget.setStyleSheet("QWidget { background: none; border: 1px solid #3b3b3b; border-radius: 8px; }")
hlayout = QtWidgets.QHBoxLayout(widget)
hlayout.setContentsMargins(9, 2, 9, 2)
# create the key field
keyField = QtWidgets.QLineEdit(widget)
# keyField.setMaximumWidth(200)
keyField.setPlaceholderText("Key")
keyField.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft)
keyField.setTextMargins(5, 0, 5, 0)
keyField.setContentsMargins(0, 0, 50, 0)
keyField.textEdited.connect(lambda txt, id=key_identifier: CustomGestaltTweaks.set_tweak_key(id, txt))
hlayout.addWidget(keyField)
# create the type dropdown
valueTypeDrp = QtWidgets.QComboBox(widget)
valueTypeDrp.setStyleSheet("QComboBox {\n background-color: #3b3b3b;\n border: none;\n color: #e8e8e8;\n font-size: 14px;\n padding-left: 8px;\n border-radius: 8px;\n}\n\nQComboBox::drop-down {\n image: url(:/icon/caret-down-fill.svg);\n icon-size: 16px;\n subcontrol-position: right center;\n margin-right: 8px;\n}\n\nQComboBox QAbstractItemView {\n background-color: #3b3b3b;\n outline: none;\n margin-top: 1px;\n}\n\nQComboBox QAbstractItemView::item {\n background-color: #3b3b3b;\n color: #e8e8e8;\n padding-left: 8px;\n}\n\nQComboBox QAbstractItemView::item:hover {\n background-color: #535353;\n color: #ffffff;\n}")
valueTypeDrp.setFixedWidth(120)
valueTypeDrp.addItems(ValueTypeStrings)
valueTypeDrp.setCurrentIndex(0)
# create the value edit field
valueField = QtWidgets.QLineEdit(widget)
valueField.setMaximumWidth(175)
valueField.setPlaceholderText("Value")
valueField.setText("1")
valueField.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight)
valueField.setTextMargins(5, 0, 5, 0)
valueField.textEdited.connect(lambda txt, id=key_identifier: CustomGestaltTweaks.set_tweak_value(id, txt))
valueTypeDrp.activated.connect(lambda idx, id=key_identifier, vf=valueField: self.update_custom_gestalt_value_type(id, idx, vf))
hlayout.addWidget(valueTypeDrp)
hlayout.addWidget(valueField)
# add it to the main widget
widget.setDisabled(False)
self.ui.customKeysLayout.addWidget(widget)
## FEATURE FLAGS PAGE ## FEATURE FLAGS PAGE

2822
mainwindow_ui.py Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1726,7 +1726,7 @@ QToolButton:pressed {
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>-292</y>
<width>650</width> <width>650</width>
<height>1200</height> <height>1200</height>
</rect> </rect>
@@ -1759,7 +1759,7 @@ QToolButton:pressed {
<item> <item>
<widget class="QWidget" name="gestaltPageContent" native="true"> <widget class="QWidget" name="gestaltPageContent" native="true">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>true</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_8"> <layout class="QVBoxLayout" name="verticalLayout_8">
<property name="leftMargin"> <property name="leftMargin">
@@ -1931,24 +1931,6 @@ QComboBox QAbstractItemView::item:hover {
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QWidget" name="horizontalWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<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>
</layout>
</widget>
</item>
<item> <item>
<widget class="Line" name="line_7"> <widget class="Line" name="line_7">
<property name="styleSheet"> <property name="styleSheet">
@@ -2064,13 +2046,6 @@ QComboBox QAbstractItemView::item:hover {
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="sleepApneaChk">
<property name="text">
<string>Enable Sleep Apnea (real) [for Apple Watches]</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QCheckBox" name="aodChk"> <widget class="QCheckBox" name="aodChk">
<property name="text"> <property name="text">
@@ -2078,6 +2053,85 @@ QComboBox QAbstractItemView::item:hover {
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="Line" name="line_22">
<property name="styleSheet">
<string notr="true">QFrame {
color: #414141;
}</string>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_10">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Custom Gestalt Keys</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="addGestaltKeyBtn">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string> Add Key</string>
</property>
<property name="icon">
<iconset>
<normaloff>:/icon/plus.svg</normaloff>:/icon/plus.svg</iconset>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_23">
<property name="styleSheet">
<string notr="true">QFrame {
color: #414141;
}</string>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="customKeysCnt" native="true">
<property name="enabled">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_32">
<item>
<layout class="QVBoxLayout" name="customKeysLayout"/>
</item>
</layout>
</widget>
</item>
<item> <item>
<spacer name="verticalSpacer_3"> <spacer name="verticalSpacer_3">
<property name="orientation"> <property name="orientation">

View File

@@ -945,7 +945,7 @@ class Ui_Nugget(object):
self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.scrollAreaWidgetContents = QWidget() self.scrollAreaWidgetContents = QWidget()
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents") self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 650, 1200)) self.scrollAreaWidgetContents.setGeometry(QRect(0, -292, 650, 1200))
self.scrollAreaWidgetContents.setMinimumSize(QSize(650, 1200)) self.scrollAreaWidgetContents.setMinimumSize(QSize(650, 1200))
self.scrollAreaWidgetContents.setMaximumSize(QSize(650, 1200)) self.scrollAreaWidgetContents.setMaximumSize(QSize(650, 1200))
self.verticalLayout_9 = QVBoxLayout(self.scrollAreaWidgetContents) self.verticalLayout_9 = QVBoxLayout(self.scrollAreaWidgetContents)
@@ -953,7 +953,7 @@ class Ui_Nugget(object):
self.verticalLayout_9.setContentsMargins(0, 0, 0, 0) self.verticalLayout_9.setContentsMargins(0, 0, 0, 0)
self.gestaltPageContent = QWidget(self.scrollAreaWidgetContents) self.gestaltPageContent = QWidget(self.scrollAreaWidgetContents)
self.gestaltPageContent.setObjectName(u"gestaltPageContent") self.gestaltPageContent.setObjectName(u"gestaltPageContent")
self.gestaltPageContent.setEnabled(False) self.gestaltPageContent.setEnabled(True)
self.verticalLayout_8 = QVBoxLayout(self.gestaltPageContent) self.verticalLayout_8 = QVBoxLayout(self.gestaltPageContent)
self.verticalLayout_8.setObjectName(u"verticalLayout_8") self.verticalLayout_8.setObjectName(u"verticalLayout_8")
self.verticalLayout_8.setContentsMargins(0, 0, 0, 0) self.verticalLayout_8.setContentsMargins(0, 0, 0, 0)
@@ -1049,14 +1049,6 @@ class Ui_Nugget(object):
self.verticalLayout_8.addWidget(self.parallaxChk) self.verticalLayout_8.addWidget(self.parallaxChk)
self.horizontalWidget4 = QWidget(self.gestaltPageContent)
self.horizontalWidget4.setObjectName(u"horizontalWidget4")
self.horizontalLayout_10 = QHBoxLayout(self.horizontalWidget4)
self.horizontalLayout_10.setObjectName(u"horizontalLayout_10")
self.horizontalLayout_10.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_8.addWidget(self.horizontalWidget4)
self.line_7 = QFrame(self.gestaltPageContent) self.line_7 = QFrame(self.gestaltPageContent)
self.line_7.setObjectName(u"line_7") self.line_7.setObjectName(u"line_7")
self.line_7.setStyleSheet(u"QFrame {\n" self.line_7.setStyleSheet(u"QFrame {\n"
@@ -1137,16 +1129,67 @@ class Ui_Nugget(object):
self.verticalLayout_8.addWidget(self.collisionSOSChk) self.verticalLayout_8.addWidget(self.collisionSOSChk)
self.sleepApneaChk = QCheckBox(self.gestaltPageContent)
self.sleepApneaChk.setObjectName(u"sleepApneaChk")
self.verticalLayout_8.addWidget(self.sleepApneaChk)
self.aodChk = QCheckBox(self.gestaltPageContent) self.aodChk = QCheckBox(self.gestaltPageContent)
self.aodChk.setObjectName(u"aodChk") self.aodChk.setObjectName(u"aodChk")
self.verticalLayout_8.addWidget(self.aodChk) self.verticalLayout_8.addWidget(self.aodChk)
self.line_22 = QFrame(self.gestaltPageContent)
self.line_22.setObjectName(u"line_22")
self.line_22.setStyleSheet(u"QFrame {\n"
" color: #414141;\n"
"}")
self.line_22.setFrameShadow(QFrame.Plain)
self.line_22.setFrameShape(QFrame.HLine)
self.verticalLayout_8.addWidget(self.line_22)
self.horizontalLayout_11 = QHBoxLayout()
self.horizontalLayout_11.setObjectName(u"horizontalLayout_11")
self.horizontalLayout_11.setContentsMargins(-1, -1, -1, 0)
self.label_10 = QLabel(self.gestaltPageContent)
self.label_10.setObjectName(u"label_10")
self.label_10.setEnabled(True)
self.horizontalLayout_11.addWidget(self.label_10)
self.addGestaltKeyBtn = QToolButton(self.gestaltPageContent)
self.addGestaltKeyBtn.setObjectName(u"addGestaltKeyBtn")
self.addGestaltKeyBtn.setEnabled(True)
icon18 = QIcon()
icon18.addFile(u":/icon/plus.svg", QSize(), QIcon.Normal, QIcon.Off)
self.addGestaltKeyBtn.setIcon(icon18)
self.addGestaltKeyBtn.setCheckable(False)
self.addGestaltKeyBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
self.horizontalLayout_11.addWidget(self.addGestaltKeyBtn)
self.verticalLayout_8.addLayout(self.horizontalLayout_11)
self.line_23 = QFrame(self.gestaltPageContent)
self.line_23.setObjectName(u"line_23")
self.line_23.setStyleSheet(u"QFrame {\n"
" color: #414141;\n"
"}")
self.line_23.setFrameShadow(QFrame.Plain)
self.line_23.setFrameShape(QFrame.HLine)
self.verticalLayout_8.addWidget(self.line_23)
self.customKeysCnt = QWidget(self.gestaltPageContent)
self.customKeysCnt.setObjectName(u"customKeysCnt")
self.customKeysCnt.setEnabled(True)
self.verticalLayout_32 = QVBoxLayout(self.customKeysCnt)
self.verticalLayout_32.setObjectName(u"verticalLayout_32")
self.customKeysLayout = QVBoxLayout()
self.customKeysLayout.setObjectName(u"customKeysLayout")
self.verticalLayout_32.addLayout(self.customKeysLayout)
self.verticalLayout_8.addWidget(self.customKeysCnt)
self.verticalSpacer_3 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) self.verticalSpacer_3 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_8.addItem(self.verticalSpacer_3) self.verticalLayout_8.addItem(self.verticalSpacer_3)
@@ -1900,9 +1943,9 @@ class Ui_Nugget(object):
self.horizontalLayout_7.setContentsMargins(-1, 10, -1, 0) self.horizontalLayout_7.setContentsMargins(-1, 10, -1, 0)
self.chooseGestaltBtn = QToolButton(self.verticalWidget2) self.chooseGestaltBtn = QToolButton(self.verticalWidget2)
self.chooseGestaltBtn.setObjectName(u"chooseGestaltBtn") self.chooseGestaltBtn.setObjectName(u"chooseGestaltBtn")
icon18 = QIcon() icon19 = QIcon()
icon18.addFile(u":/icon/folder.svg", QSize(), QIcon.Normal, QIcon.Off) icon19.addFile(u":/icon/folder.svg", QSize(), QIcon.Normal, QIcon.Off)
self.chooseGestaltBtn.setIcon(icon18) self.chooseGestaltBtn.setIcon(icon19)
self.chooseGestaltBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.chooseGestaltBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
self.horizontalLayout_7.addWidget(self.chooseGestaltBtn) self.horizontalLayout_7.addWidget(self.chooseGestaltBtn)
@@ -1910,12 +1953,12 @@ class Ui_Nugget(object):
self.verticalLayout_24.addLayout(self.horizontalLayout_7) self.verticalLayout_24.addLayout(self.horizontalLayout_7)
self.horizontalWidget5 = QWidget(self.verticalWidget2) self.horizontalWidget4 = QWidget(self.verticalWidget2)
self.horizontalWidget5.setObjectName(u"horizontalWidget5") self.horizontalWidget4.setObjectName(u"horizontalWidget4")
self.horizontalLayout_17 = QHBoxLayout(self.horizontalWidget5) self.horizontalLayout_17 = QHBoxLayout(self.horizontalWidget4)
self.horizontalLayout_17.setObjectName(u"horizontalLayout_17") self.horizontalLayout_17.setObjectName(u"horizontalLayout_17")
self.horizontalLayout_17.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_17.setContentsMargins(0, 0, 0, 0)
self.applyTweaksBtn = QToolButton(self.horizontalWidget5) self.applyTweaksBtn = QToolButton(self.horizontalWidget4)
self.applyTweaksBtn.setObjectName(u"applyTweaksBtn") self.applyTweaksBtn.setObjectName(u"applyTweaksBtn")
self.applyTweaksBtn.setIcon(icon9) self.applyTweaksBtn.setIcon(icon9)
self.applyTweaksBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.applyTweaksBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
@@ -1923,7 +1966,7 @@ class Ui_Nugget(object):
self.horizontalLayout_17.addWidget(self.applyTweaksBtn) self.horizontalLayout_17.addWidget(self.applyTweaksBtn)
self.verticalLayout_24.addWidget(self.horizontalWidget5) self.verticalLayout_24.addWidget(self.horizontalWidget4)
self.statusLbl = QLabel(self.verticalWidget2) self.statusLbl = QLabel(self.verticalWidget2)
self.statusLbl.setObjectName(u"statusLbl") self.statusLbl.setObjectName(u"statusLbl")
@@ -1945,21 +1988,21 @@ class Ui_Nugget(object):
self.verticalLayout_24.addItem(self.verticalSpacer_2) self.verticalLayout_24.addItem(self.verticalSpacer_2)
self.horizontalWidget6 = QWidget(self.verticalWidget2) self.horizontalWidget5 = QWidget(self.verticalWidget2)
self.horizontalWidget6.setObjectName(u"horizontalWidget6") self.horizontalWidget5.setObjectName(u"horizontalWidget5")
self.horizontalLayout_25 = QHBoxLayout(self.horizontalWidget6) self.horizontalLayout_25 = QHBoxLayout(self.horizontalWidget5)
self.horizontalLayout_25.setObjectName(u"horizontalLayout_25") self.horizontalLayout_25.setObjectName(u"horizontalLayout_25")
self.horizontalLayout_25.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_25.setContentsMargins(0, 0, 0, 0)
self.horizontalSpacer_14 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum) self.horizontalSpacer_14 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout_25.addItem(self.horizontalSpacer_14) self.horizontalLayout_25.addItem(self.horizontalSpacer_14)
self.removeTweaksBtn = QToolButton(self.horizontalWidget6) self.removeTweaksBtn = QToolButton(self.horizontalWidget5)
self.removeTweaksBtn.setObjectName(u"removeTweaksBtn") self.removeTweaksBtn.setObjectName(u"removeTweaksBtn")
self.horizontalLayout_25.addWidget(self.removeTweaksBtn) self.horizontalLayout_25.addWidget(self.removeTweaksBtn)
self.resetGestaltBtn = QToolButton(self.horizontalWidget6) self.resetGestaltBtn = QToolButton(self.horizontalWidget5)
self.resetGestaltBtn.setObjectName(u"resetGestaltBtn") self.resetGestaltBtn.setObjectName(u"resetGestaltBtn")
self.horizontalLayout_25.addWidget(self.resetGestaltBtn) self.horizontalLayout_25.addWidget(self.resetGestaltBtn)
@@ -1969,7 +2012,7 @@ class Ui_Nugget(object):
self.horizontalLayout_25.addItem(self.horizontalSpacer_16) self.horizontalLayout_25.addItem(self.horizontalSpacer_16)
self.verticalLayout_24.addWidget(self.horizontalWidget6) self.verticalLayout_24.addWidget(self.horizontalWidget5)
self.verticalLayout_6.addWidget(self.verticalWidget2) self.verticalLayout_6.addWidget(self.verticalWidget2)
@@ -2189,18 +2232,18 @@ class Ui_Nugget(object):
self.verticalLayout_29.addWidget(self.longitudeTxt) self.verticalLayout_29.addWidget(self.longitudeTxt)
self.horizontalWidget7 = QWidget(self.verticalWidget3) self.horizontalWidget6 = QWidget(self.verticalWidget3)
self.horizontalWidget7.setObjectName(u"horizontalWidget7") self.horizontalWidget6.setObjectName(u"horizontalWidget6")
self.horizontalLayout_3 = QHBoxLayout(self.horizontalWidget7) self.horizontalLayout_3 = QHBoxLayout(self.horizontalWidget6)
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
self.setLocationBtn = QToolButton(self.horizontalWidget7) self.setLocationBtn = QToolButton(self.horizontalWidget6)
self.setLocationBtn.setObjectName(u"setLocationBtn") self.setLocationBtn.setObjectName(u"setLocationBtn")
self.horizontalLayout_3.addWidget(self.setLocationBtn) self.horizontalLayout_3.addWidget(self.setLocationBtn)
self.verticalLayout_29.addWidget(self.horizontalWidget7) self.verticalLayout_29.addWidget(self.horizontalWidget6)
self.horizontalWidget_22 = QWidget(self.verticalWidget3) self.horizontalWidget_22 = QWidget(self.verticalWidget3)
self.horizontalWidget_22.setObjectName(u"horizontalWidget_22") self.horizontalWidget_22.setObjectName(u"horizontalWidget_22")
@@ -2247,9 +2290,9 @@ class Ui_Nugget(object):
" padding-right: 5px;\n" " padding-right: 5px;\n"
" border-radius: 0px;\n" " border-radius: 0px;\n"
"}") "}")
icon19 = QIcon() icon20 = QIcon()
icon19.addFile(u":/icon/pencil.svg", QSize(), QIcon.Normal, QIcon.Off) icon20.addFile(u":/icon/pencil.svg", QSize(), QIcon.Normal, QIcon.Off)
self.toolButton_12.setIcon(icon19) self.toolButton_12.setIcon(icon20)
self.toolButton_12.setIconSize(QSize(25, 25)) self.toolButton_12.setIconSize(QSize(25, 25))
self.horizontalLayout_22.addWidget(self.toolButton_12) self.horizontalLayout_22.addWidget(self.toolButton_12)
@@ -2310,9 +2353,9 @@ class Ui_Nugget(object):
self.importOperationBtn = QToolButton(self.customOperationsPageContent) self.importOperationBtn = QToolButton(self.customOperationsPageContent)
self.importOperationBtn.setObjectName(u"importOperationBtn") self.importOperationBtn.setObjectName(u"importOperationBtn")
self.importOperationBtn.setEnabled(True) self.importOperationBtn.setEnabled(True)
icon20 = QIcon() icon21 = QIcon()
icon20.addFile(u":/icon/import.svg", QSize(), QIcon.Normal, QIcon.Off) icon21.addFile(u":/icon/import.svg", QSize(), QIcon.Normal, QIcon.Off)
self.importOperationBtn.setIcon(icon20) self.importOperationBtn.setIcon(icon21)
self.importOperationBtn.setIconSize(QSize(20, 20)) self.importOperationBtn.setIconSize(QSize(20, 20))
self.importOperationBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.importOperationBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
@@ -2324,9 +2367,7 @@ class Ui_Nugget(object):
sizePolicy2.setHeightForWidth(self.newOperationBtn.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.newOperationBtn.sizePolicy().hasHeightForWidth())
self.newOperationBtn.setSizePolicy(sizePolicy2) self.newOperationBtn.setSizePolicy(sizePolicy2)
self.newOperationBtn.setMinimumSize(QSize(0, 35)) self.newOperationBtn.setMinimumSize(QSize(0, 35))
icon21 = QIcon() self.newOperationBtn.setIcon(icon18)
icon21.addFile(u":/icon/plus.svg", QSize(), QIcon.Normal, QIcon.Off)
self.newOperationBtn.setIcon(icon21)
self.newOperationBtn.setIconSize(QSize(16, 16)) self.newOperationBtn.setIconSize(QSize(16, 16))
self.newOperationBtn.setCheckable(False) self.newOperationBtn.setCheckable(False)
self.newOperationBtn.setAutoExclusive(True) self.newOperationBtn.setAutoExclusive(True)
@@ -2467,12 +2508,12 @@ class Ui_Nugget(object):
self.horizontalLayout_23.addItem(self.horizontalSpacer_10) self.horizontalLayout_23.addItem(self.horizontalSpacer_10)
self.horizontalWidget8 = QWidget(self.horizontalWidget_8) self.horizontalWidget7 = QWidget(self.horizontalWidget_8)
self.horizontalWidget8.setObjectName(u"horizontalWidget8") self.horizontalWidget7.setObjectName(u"horizontalWidget7")
self.horizontalLayout_26 = QHBoxLayout(self.horizontalWidget8) self.horizontalLayout_26 = QHBoxLayout(self.horizontalWidget7)
self.horizontalLayout_26.setObjectName(u"horizontalLayout_26") self.horizontalLayout_26.setObjectName(u"horizontalLayout_26")
self.horizontalLayout_26.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_26.setContentsMargins(0, 0, 0, 0)
self.importThemeBtn = QToolButton(self.horizontalWidget8) self.importThemeBtn = QToolButton(self.horizontalWidget7)
self.importThemeBtn.setObjectName(u"importThemeBtn") self.importThemeBtn.setObjectName(u"importThemeBtn")
self.importThemeBtn.setEnabled(False) self.importThemeBtn.setEnabled(False)
self.importThemeBtn.setStyleSheet(u"QToolButton {\n" self.importThemeBtn.setStyleSheet(u"QToolButton {\n"
@@ -2481,13 +2522,13 @@ class Ui_Nugget(object):
self.horizontalLayout_26.addWidget(self.importThemeBtn) self.horizontalLayout_26.addWidget(self.importThemeBtn)
self.importThemeFolderBtn = QToolButton(self.horizontalWidget8) self.importThemeFolderBtn = QToolButton(self.horizontalWidget7)
self.importThemeFolderBtn.setObjectName(u"importThemeFolderBtn") self.importThemeFolderBtn.setObjectName(u"importThemeFolderBtn")
self.importThemeFolderBtn.setIcon(icon18) self.importThemeFolderBtn.setIcon(icon19)
self.horizontalLayout_26.addWidget(self.importThemeFolderBtn) self.horizontalLayout_26.addWidget(self.importThemeFolderBtn)
self.importThemeZipBtn = QToolButton(self.horizontalWidget8) self.importThemeZipBtn = QToolButton(self.horizontalWidget7)
self.importThemeZipBtn.setObjectName(u"importThemeZipBtn") self.importThemeZipBtn.setObjectName(u"importThemeZipBtn")
icon22 = QIcon() icon22 = QIcon()
icon22.addFile(u":/icon/file-earmark-zip.svg", QSize(), QIcon.Normal, QIcon.Off) icon22.addFile(u":/icon/file-earmark-zip.svg", QSize(), QIcon.Normal, QIcon.Off)
@@ -2496,7 +2537,7 @@ class Ui_Nugget(object):
self.horizontalLayout_26.addWidget(self.importThemeZipBtn) self.horizontalLayout_26.addWidget(self.importThemeZipBtn)
self.horizontalLayout_23.addWidget(self.horizontalWidget8) self.horizontalLayout_23.addWidget(self.horizontalWidget7)
self.verticalLayout_23.addWidget(self.horizontalWidget_8) self.verticalLayout_23.addWidget(self.horizontalWidget_8)
@@ -2546,26 +2587,26 @@ class Ui_Nugget(object):
self.verticalLayout_22.addItem(self.verticalSpacer_9) self.verticalLayout_22.addItem(self.verticalSpacer_9)
self.horizontalWidget9 = QWidget(self.themesPageContent) self.horizontalWidget8 = QWidget(self.themesPageContent)
self.horizontalWidget9.setObjectName(u"horizontalWidget9") self.horizontalWidget8.setObjectName(u"horizontalWidget8")
self.horizontalLayout_16 = QHBoxLayout(self.horizontalWidget9) self.horizontalLayout_16 = QHBoxLayout(self.horizontalWidget8)
self.horizontalLayout_16.setObjectName(u"horizontalLayout_16") self.horizontalLayout_16.setObjectName(u"horizontalLayout_16")
self.horizontalLayout_16.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_16.setContentsMargins(0, 0, 0, 0)
self.hideNamesBtn = QToolButton(self.horizontalWidget9) self.hideNamesBtn = QToolButton(self.horizontalWidget8)
self.hideNamesBtn.setObjectName(u"hideNamesBtn") self.hideNamesBtn.setObjectName(u"hideNamesBtn")
sizePolicy2.setHeightForWidth(self.hideNamesBtn.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.hideNamesBtn.sizePolicy().hasHeightForWidth())
self.hideNamesBtn.setSizePolicy(sizePolicy2) self.hideNamesBtn.setSizePolicy(sizePolicy2)
self.horizontalLayout_16.addWidget(self.hideNamesBtn) self.horizontalLayout_16.addWidget(self.hideNamesBtn)
self.borderAllBtn = QToolButton(self.horizontalWidget9) self.borderAllBtn = QToolButton(self.horizontalWidget8)
self.borderAllBtn.setObjectName(u"borderAllBtn") self.borderAllBtn.setObjectName(u"borderAllBtn")
sizePolicy2.setHeightForWidth(self.borderAllBtn.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.borderAllBtn.sizePolicy().hasHeightForWidth())
self.borderAllBtn.setSizePolicy(sizePolicy2) self.borderAllBtn.setSizePolicy(sizePolicy2)
self.horizontalLayout_16.addWidget(self.borderAllBtn) self.horizontalLayout_16.addWidget(self.borderAllBtn)
self.addAllBtn = QToolButton(self.horizontalWidget9) self.addAllBtn = QToolButton(self.horizontalWidget8)
self.addAllBtn.setObjectName(u"addAllBtn") self.addAllBtn.setObjectName(u"addAllBtn")
sizePolicy2.setHeightForWidth(self.addAllBtn.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.addAllBtn.sizePolicy().hasHeightForWidth())
self.addAllBtn.setSizePolicy(sizePolicy2) self.addAllBtn.setSizePolicy(sizePolicy2)
@@ -2573,7 +2614,7 @@ class Ui_Nugget(object):
self.horizontalLayout_16.addWidget(self.addAllBtn) self.horizontalLayout_16.addWidget(self.addAllBtn)
self.verticalLayout_22.addWidget(self.horizontalWidget9) self.verticalLayout_22.addWidget(self.horizontalWidget8)
self.verticalLayout_23.addWidget(self.themesPageContent) self.verticalLayout_23.addWidget(self.themesPageContent)
@@ -2678,8 +2719,9 @@ class Ui_Nugget(object):
self.internalInstallChk.setText(QCoreApplication.translate("Nugget", u"Set as Apple Internal Install (ie Metal HUD in any app)", None)) self.internalInstallChk.setText(QCoreApplication.translate("Nugget", u"Set as Apple Internal Install (ie Metal HUD in any app)", None))
self.internalStorageChk.setText(QCoreApplication.translate("Nugget", u"Enable Internal Storage (WARNING: risky for some devices, mainly iPads)", None)) self.internalStorageChk.setText(QCoreApplication.translate("Nugget", u"Enable Internal Storage (WARNING: risky for some devices, mainly iPads)", None))
self.collisionSOSChk.setText(QCoreApplication.translate("Nugget", u"Enable Collision SOS", None)) self.collisionSOSChk.setText(QCoreApplication.translate("Nugget", u"Enable Collision SOS", None))
self.sleepApneaChk.setText(QCoreApplication.translate("Nugget", u"Enable Sleep Apnea (real) [for Apple Watches]", None))
self.aodChk.setText(QCoreApplication.translate("Nugget", u"Enable Always On Display", None)) self.aodChk.setText(QCoreApplication.translate("Nugget", u"Enable Always On Display", None))
self.label_10.setText(QCoreApplication.translate("Nugget", u"Custom Gestalt Keys", None))
self.addGestaltKeyBtn.setText(QCoreApplication.translate("Nugget", u" Add Key", None))
self.internalOptionsLbl.setText(QCoreApplication.translate("Nugget", u"Feature Flags", None)) self.internalOptionsLbl.setText(QCoreApplication.translate("Nugget", u"Feature Flags", None))
self.clockAnimChk.setText(QCoreApplication.translate("Nugget", u"Enable Lockscreen Clock Animation", None)) self.clockAnimChk.setText(QCoreApplication.translate("Nugget", u"Enable Lockscreen Clock Animation", None))
self.lockscreenChk.setText(QCoreApplication.translate("Nugget", u"Enable Duplicate Lockscreen Button and Lockscreen Quickswitch", None)) self.lockscreenChk.setText(QCoreApplication.translate("Nugget", u"Enable Duplicate Lockscreen Button and Lockscreen Quickswitch", None))

View File

@@ -945,7 +945,7 @@ class Ui_Nugget(object):
self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.scrollAreaWidgetContents = QWidget() self.scrollAreaWidgetContents = QWidget()
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents") self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 650, 1200)) self.scrollAreaWidgetContents.setGeometry(QRect(0, -292, 650, 1200))
self.scrollAreaWidgetContents.setMinimumSize(QSize(650, 1200)) self.scrollAreaWidgetContents.setMinimumSize(QSize(650, 1200))
self.scrollAreaWidgetContents.setMaximumSize(QSize(650, 1200)) self.scrollAreaWidgetContents.setMaximumSize(QSize(650, 1200))
self.verticalLayout_9 = QVBoxLayout(self.scrollAreaWidgetContents) self.verticalLayout_9 = QVBoxLayout(self.scrollAreaWidgetContents)
@@ -953,7 +953,7 @@ class Ui_Nugget(object):
self.verticalLayout_9.setContentsMargins(0, 0, 0, 0) self.verticalLayout_9.setContentsMargins(0, 0, 0, 0)
self.gestaltPageContent = QWidget(self.scrollAreaWidgetContents) self.gestaltPageContent = QWidget(self.scrollAreaWidgetContents)
self.gestaltPageContent.setObjectName(u"gestaltPageContent") self.gestaltPageContent.setObjectName(u"gestaltPageContent")
self.gestaltPageContent.setEnabled(False) self.gestaltPageContent.setEnabled(True)
self.verticalLayout_8 = QVBoxLayout(self.gestaltPageContent) self.verticalLayout_8 = QVBoxLayout(self.gestaltPageContent)
self.verticalLayout_8.setObjectName(u"verticalLayout_8") self.verticalLayout_8.setObjectName(u"verticalLayout_8")
self.verticalLayout_8.setContentsMargins(0, 0, 0, 0) self.verticalLayout_8.setContentsMargins(0, 0, 0, 0)
@@ -1049,14 +1049,6 @@ class Ui_Nugget(object):
self.verticalLayout_8.addWidget(self.parallaxChk) self.verticalLayout_8.addWidget(self.parallaxChk)
self.horizontalWidget4 = QWidget(self.gestaltPageContent)
self.horizontalWidget4.setObjectName(u"horizontalWidget4")
self.horizontalLayout_10 = QHBoxLayout(self.horizontalWidget4)
self.horizontalLayout_10.setObjectName(u"horizontalLayout_10")
self.horizontalLayout_10.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_8.addWidget(self.horizontalWidget4)
self.line_7 = QFrame(self.gestaltPageContent) self.line_7 = QFrame(self.gestaltPageContent)
self.line_7.setObjectName(u"line_7") self.line_7.setObjectName(u"line_7")
self.line_7.setStyleSheet(u"QFrame {\n" self.line_7.setStyleSheet(u"QFrame {\n"
@@ -1137,16 +1129,67 @@ class Ui_Nugget(object):
self.verticalLayout_8.addWidget(self.collisionSOSChk) self.verticalLayout_8.addWidget(self.collisionSOSChk)
self.sleepApneaChk = QCheckBox(self.gestaltPageContent)
self.sleepApneaChk.setObjectName(u"sleepApneaChk")
self.verticalLayout_8.addWidget(self.sleepApneaChk)
self.aodChk = QCheckBox(self.gestaltPageContent) self.aodChk = QCheckBox(self.gestaltPageContent)
self.aodChk.setObjectName(u"aodChk") self.aodChk.setObjectName(u"aodChk")
self.verticalLayout_8.addWidget(self.aodChk) self.verticalLayout_8.addWidget(self.aodChk)
self.line_22 = QFrame(self.gestaltPageContent)
self.line_22.setObjectName(u"line_22")
self.line_22.setStyleSheet(u"QFrame {\n"
" color: #414141;\n"
"}")
self.line_22.setFrameShadow(QFrame.Plain)
self.line_22.setFrameShape(QFrame.Shape.HLine)
self.verticalLayout_8.addWidget(self.line_22)
self.horizontalLayout_11 = QHBoxLayout()
self.horizontalLayout_11.setObjectName(u"horizontalLayout_11")
self.horizontalLayout_11.setContentsMargins(-1, -1, -1, 0)
self.label_10 = QLabel(self.gestaltPageContent)
self.label_10.setObjectName(u"label_10")
self.label_10.setEnabled(True)
self.horizontalLayout_11.addWidget(self.label_10)
self.addGestaltKeyBtn = QToolButton(self.gestaltPageContent)
self.addGestaltKeyBtn.setObjectName(u"addGestaltKeyBtn")
self.addGestaltKeyBtn.setEnabled(True)
icon18 = QIcon()
icon18.addFile(u":/icon/plus.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
self.addGestaltKeyBtn.setIcon(icon18)
self.addGestaltKeyBtn.setCheckable(False)
self.addGestaltKeyBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
self.horizontalLayout_11.addWidget(self.addGestaltKeyBtn)
self.verticalLayout_8.addLayout(self.horizontalLayout_11)
self.line_23 = QFrame(self.gestaltPageContent)
self.line_23.setObjectName(u"line_23")
self.line_23.setStyleSheet(u"QFrame {\n"
" color: #414141;\n"
"}")
self.line_23.setFrameShadow(QFrame.Plain)
self.line_23.setFrameShape(QFrame.Shape.HLine)
self.verticalLayout_8.addWidget(self.line_23)
self.customKeysCnt = QWidget(self.gestaltPageContent)
self.customKeysCnt.setObjectName(u"customKeysCnt")
self.customKeysCnt.setEnabled(True)
self.verticalLayout_32 = QVBoxLayout(self.customKeysCnt)
self.verticalLayout_32.setObjectName(u"verticalLayout_32")
self.customKeysLayout = QVBoxLayout()
self.customKeysLayout.setObjectName(u"customKeysLayout")
self.verticalLayout_32.addLayout(self.customKeysLayout)
self.verticalLayout_8.addWidget(self.customKeysCnt)
self.verticalSpacer_3 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) self.verticalSpacer_3 = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
self.verticalLayout_8.addItem(self.verticalSpacer_3) self.verticalLayout_8.addItem(self.verticalSpacer_3)
@@ -1900,9 +1943,9 @@ class Ui_Nugget(object):
self.horizontalLayout_7.setContentsMargins(-1, 10, -1, 0) self.horizontalLayout_7.setContentsMargins(-1, 10, -1, 0)
self.chooseGestaltBtn = QToolButton(self.verticalWidget2) self.chooseGestaltBtn = QToolButton(self.verticalWidget2)
self.chooseGestaltBtn.setObjectName(u"chooseGestaltBtn") self.chooseGestaltBtn.setObjectName(u"chooseGestaltBtn")
icon18 = QIcon() icon19 = QIcon()
icon18.addFile(u":/icon/folder.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off) icon19.addFile(u":/icon/folder.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
self.chooseGestaltBtn.setIcon(icon18) self.chooseGestaltBtn.setIcon(icon19)
self.chooseGestaltBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.chooseGestaltBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
self.horizontalLayout_7.addWidget(self.chooseGestaltBtn) self.horizontalLayout_7.addWidget(self.chooseGestaltBtn)
@@ -1910,12 +1953,12 @@ class Ui_Nugget(object):
self.verticalLayout_24.addLayout(self.horizontalLayout_7) self.verticalLayout_24.addLayout(self.horizontalLayout_7)
self.horizontalWidget5 = QWidget(self.verticalWidget2) self.horizontalWidget4 = QWidget(self.verticalWidget2)
self.horizontalWidget5.setObjectName(u"horizontalWidget5") self.horizontalWidget4.setObjectName(u"horizontalWidget4")
self.horizontalLayout_17 = QHBoxLayout(self.horizontalWidget5) self.horizontalLayout_17 = QHBoxLayout(self.horizontalWidget4)
self.horizontalLayout_17.setObjectName(u"horizontalLayout_17") self.horizontalLayout_17.setObjectName(u"horizontalLayout_17")
self.horizontalLayout_17.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_17.setContentsMargins(0, 0, 0, 0)
self.applyTweaksBtn = QToolButton(self.horizontalWidget5) self.applyTweaksBtn = QToolButton(self.horizontalWidget4)
self.applyTweaksBtn.setObjectName(u"applyTweaksBtn") self.applyTweaksBtn.setObjectName(u"applyTweaksBtn")
self.applyTweaksBtn.setIcon(icon9) self.applyTweaksBtn.setIcon(icon9)
self.applyTweaksBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.applyTweaksBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
@@ -1923,7 +1966,7 @@ class Ui_Nugget(object):
self.horizontalLayout_17.addWidget(self.applyTweaksBtn) self.horizontalLayout_17.addWidget(self.applyTweaksBtn)
self.verticalLayout_24.addWidget(self.horizontalWidget5) self.verticalLayout_24.addWidget(self.horizontalWidget4)
self.statusLbl = QLabel(self.verticalWidget2) self.statusLbl = QLabel(self.verticalWidget2)
self.statusLbl.setObjectName(u"statusLbl") self.statusLbl.setObjectName(u"statusLbl")
@@ -1945,21 +1988,21 @@ class Ui_Nugget(object):
self.verticalLayout_24.addItem(self.verticalSpacer_2) self.verticalLayout_24.addItem(self.verticalSpacer_2)
self.horizontalWidget6 = QWidget(self.verticalWidget2) self.horizontalWidget5 = QWidget(self.verticalWidget2)
self.horizontalWidget6.setObjectName(u"horizontalWidget6") self.horizontalWidget5.setObjectName(u"horizontalWidget5")
self.horizontalLayout_25 = QHBoxLayout(self.horizontalWidget6) self.horizontalLayout_25 = QHBoxLayout(self.horizontalWidget5)
self.horizontalLayout_25.setObjectName(u"horizontalLayout_25") self.horizontalLayout_25.setObjectName(u"horizontalLayout_25")
self.horizontalLayout_25.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_25.setContentsMargins(0, 0, 0, 0)
self.horizontalSpacer_14 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum) self.horizontalSpacer_14 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
self.horizontalLayout_25.addItem(self.horizontalSpacer_14) self.horizontalLayout_25.addItem(self.horizontalSpacer_14)
self.removeTweaksBtn = QToolButton(self.horizontalWidget6) self.removeTweaksBtn = QToolButton(self.horizontalWidget5)
self.removeTweaksBtn.setObjectName(u"removeTweaksBtn") self.removeTweaksBtn.setObjectName(u"removeTweaksBtn")
self.horizontalLayout_25.addWidget(self.removeTweaksBtn) self.horizontalLayout_25.addWidget(self.removeTweaksBtn)
self.resetGestaltBtn = QToolButton(self.horizontalWidget6) self.resetGestaltBtn = QToolButton(self.horizontalWidget5)
self.resetGestaltBtn.setObjectName(u"resetGestaltBtn") self.resetGestaltBtn.setObjectName(u"resetGestaltBtn")
self.horizontalLayout_25.addWidget(self.resetGestaltBtn) self.horizontalLayout_25.addWidget(self.resetGestaltBtn)
@@ -1969,7 +2012,7 @@ class Ui_Nugget(object):
self.horizontalLayout_25.addItem(self.horizontalSpacer_16) self.horizontalLayout_25.addItem(self.horizontalSpacer_16)
self.verticalLayout_24.addWidget(self.horizontalWidget6) self.verticalLayout_24.addWidget(self.horizontalWidget5)
self.verticalLayout_6.addWidget(self.verticalWidget2) self.verticalLayout_6.addWidget(self.verticalWidget2)
@@ -2189,18 +2232,18 @@ class Ui_Nugget(object):
self.verticalLayout_29.addWidget(self.longitudeTxt) self.verticalLayout_29.addWidget(self.longitudeTxt)
self.horizontalWidget7 = QWidget(self.verticalWidget3) self.horizontalWidget6 = QWidget(self.verticalWidget3)
self.horizontalWidget7.setObjectName(u"horizontalWidget7") self.horizontalWidget6.setObjectName(u"horizontalWidget6")
self.horizontalLayout_3 = QHBoxLayout(self.horizontalWidget7) self.horizontalLayout_3 = QHBoxLayout(self.horizontalWidget6)
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
self.setLocationBtn = QToolButton(self.horizontalWidget7) self.setLocationBtn = QToolButton(self.horizontalWidget6)
self.setLocationBtn.setObjectName(u"setLocationBtn") self.setLocationBtn.setObjectName(u"setLocationBtn")
self.horizontalLayout_3.addWidget(self.setLocationBtn) self.horizontalLayout_3.addWidget(self.setLocationBtn)
self.verticalLayout_29.addWidget(self.horizontalWidget7) self.verticalLayout_29.addWidget(self.horizontalWidget6)
self.horizontalWidget_22 = QWidget(self.verticalWidget3) self.horizontalWidget_22 = QWidget(self.verticalWidget3)
self.horizontalWidget_22.setObjectName(u"horizontalWidget_22") self.horizontalWidget_22.setObjectName(u"horizontalWidget_22")
@@ -2247,9 +2290,9 @@ class Ui_Nugget(object):
" padding-right: 5px;\n" " padding-right: 5px;\n"
" border-radius: 0px;\n" " border-radius: 0px;\n"
"}") "}")
icon19 = QIcon() icon20 = QIcon()
icon19.addFile(u":/icon/pencil.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off) icon20.addFile(u":/icon/pencil.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
self.toolButton_12.setIcon(icon19) self.toolButton_12.setIcon(icon20)
self.toolButton_12.setIconSize(QSize(25, 25)) self.toolButton_12.setIconSize(QSize(25, 25))
self.horizontalLayout_22.addWidget(self.toolButton_12) self.horizontalLayout_22.addWidget(self.toolButton_12)
@@ -2310,9 +2353,9 @@ class Ui_Nugget(object):
self.importOperationBtn = QToolButton(self.customOperationsPageContent) self.importOperationBtn = QToolButton(self.customOperationsPageContent)
self.importOperationBtn.setObjectName(u"importOperationBtn") self.importOperationBtn.setObjectName(u"importOperationBtn")
self.importOperationBtn.setEnabled(True) self.importOperationBtn.setEnabled(True)
icon20 = QIcon() icon21 = QIcon()
icon20.addFile(u":/icon/import.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off) icon21.addFile(u":/icon/import.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
self.importOperationBtn.setIcon(icon20) self.importOperationBtn.setIcon(icon21)
self.importOperationBtn.setIconSize(QSize(20, 20)) self.importOperationBtn.setIconSize(QSize(20, 20))
self.importOperationBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.importOperationBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
@@ -2324,9 +2367,7 @@ class Ui_Nugget(object):
sizePolicy2.setHeightForWidth(self.newOperationBtn.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.newOperationBtn.sizePolicy().hasHeightForWidth())
self.newOperationBtn.setSizePolicy(sizePolicy2) self.newOperationBtn.setSizePolicy(sizePolicy2)
self.newOperationBtn.setMinimumSize(QSize(0, 35)) self.newOperationBtn.setMinimumSize(QSize(0, 35))
icon21 = QIcon() self.newOperationBtn.setIcon(icon18)
icon21.addFile(u":/icon/plus.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
self.newOperationBtn.setIcon(icon21)
self.newOperationBtn.setIconSize(QSize(16, 16)) self.newOperationBtn.setIconSize(QSize(16, 16))
self.newOperationBtn.setCheckable(False) self.newOperationBtn.setCheckable(False)
self.newOperationBtn.setAutoExclusive(True) self.newOperationBtn.setAutoExclusive(True)
@@ -2467,12 +2508,12 @@ class Ui_Nugget(object):
self.horizontalLayout_23.addItem(self.horizontalSpacer_10) self.horizontalLayout_23.addItem(self.horizontalSpacer_10)
self.horizontalWidget8 = QWidget(self.horizontalWidget_8) self.horizontalWidget7 = QWidget(self.horizontalWidget_8)
self.horizontalWidget8.setObjectName(u"horizontalWidget8") self.horizontalWidget7.setObjectName(u"horizontalWidget7")
self.horizontalLayout_26 = QHBoxLayout(self.horizontalWidget8) self.horizontalLayout_26 = QHBoxLayout(self.horizontalWidget7)
self.horizontalLayout_26.setObjectName(u"horizontalLayout_26") self.horizontalLayout_26.setObjectName(u"horizontalLayout_26")
self.horizontalLayout_26.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_26.setContentsMargins(0, 0, 0, 0)
self.importThemeBtn = QToolButton(self.horizontalWidget8) self.importThemeBtn = QToolButton(self.horizontalWidget7)
self.importThemeBtn.setObjectName(u"importThemeBtn") self.importThemeBtn.setObjectName(u"importThemeBtn")
self.importThemeBtn.setEnabled(False) self.importThemeBtn.setEnabled(False)
self.importThemeBtn.setStyleSheet(u"QToolButton {\n" self.importThemeBtn.setStyleSheet(u"QToolButton {\n"
@@ -2481,13 +2522,13 @@ class Ui_Nugget(object):
self.horizontalLayout_26.addWidget(self.importThemeBtn) self.horizontalLayout_26.addWidget(self.importThemeBtn)
self.importThemeFolderBtn = QToolButton(self.horizontalWidget8) self.importThemeFolderBtn = QToolButton(self.horizontalWidget7)
self.importThemeFolderBtn.setObjectName(u"importThemeFolderBtn") self.importThemeFolderBtn.setObjectName(u"importThemeFolderBtn")
self.importThemeFolderBtn.setIcon(icon18) self.importThemeFolderBtn.setIcon(icon19)
self.horizontalLayout_26.addWidget(self.importThemeFolderBtn) self.horizontalLayout_26.addWidget(self.importThemeFolderBtn)
self.importThemeZipBtn = QToolButton(self.horizontalWidget8) self.importThemeZipBtn = QToolButton(self.horizontalWidget7)
self.importThemeZipBtn.setObjectName(u"importThemeZipBtn") self.importThemeZipBtn.setObjectName(u"importThemeZipBtn")
icon22 = QIcon() icon22 = QIcon()
icon22.addFile(u":/icon/file-earmark-zip.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off) icon22.addFile(u":/icon/file-earmark-zip.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
@@ -2496,7 +2537,7 @@ class Ui_Nugget(object):
self.horizontalLayout_26.addWidget(self.importThemeZipBtn) self.horizontalLayout_26.addWidget(self.importThemeZipBtn)
self.horizontalLayout_23.addWidget(self.horizontalWidget8) self.horizontalLayout_23.addWidget(self.horizontalWidget7)
self.verticalLayout_23.addWidget(self.horizontalWidget_8) self.verticalLayout_23.addWidget(self.horizontalWidget_8)
@@ -2546,26 +2587,26 @@ class Ui_Nugget(object):
self.verticalLayout_22.addItem(self.verticalSpacer_9) self.verticalLayout_22.addItem(self.verticalSpacer_9)
self.horizontalWidget9 = QWidget(self.themesPageContent) self.horizontalWidget8 = QWidget(self.themesPageContent)
self.horizontalWidget9.setObjectName(u"horizontalWidget9") self.horizontalWidget8.setObjectName(u"horizontalWidget8")
self.horizontalLayout_16 = QHBoxLayout(self.horizontalWidget9) self.horizontalLayout_16 = QHBoxLayout(self.horizontalWidget8)
self.horizontalLayout_16.setObjectName(u"horizontalLayout_16") self.horizontalLayout_16.setObjectName(u"horizontalLayout_16")
self.horizontalLayout_16.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_16.setContentsMargins(0, 0, 0, 0)
self.hideNamesBtn = QToolButton(self.horizontalWidget9) self.hideNamesBtn = QToolButton(self.horizontalWidget8)
self.hideNamesBtn.setObjectName(u"hideNamesBtn") self.hideNamesBtn.setObjectName(u"hideNamesBtn")
sizePolicy2.setHeightForWidth(self.hideNamesBtn.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.hideNamesBtn.sizePolicy().hasHeightForWidth())
self.hideNamesBtn.setSizePolicy(sizePolicy2) self.hideNamesBtn.setSizePolicy(sizePolicy2)
self.horizontalLayout_16.addWidget(self.hideNamesBtn) self.horizontalLayout_16.addWidget(self.hideNamesBtn)
self.borderAllBtn = QToolButton(self.horizontalWidget9) self.borderAllBtn = QToolButton(self.horizontalWidget8)
self.borderAllBtn.setObjectName(u"borderAllBtn") self.borderAllBtn.setObjectName(u"borderAllBtn")
sizePolicy2.setHeightForWidth(self.borderAllBtn.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.borderAllBtn.sizePolicy().hasHeightForWidth())
self.borderAllBtn.setSizePolicy(sizePolicy2) self.borderAllBtn.setSizePolicy(sizePolicy2)
self.horizontalLayout_16.addWidget(self.borderAllBtn) self.horizontalLayout_16.addWidget(self.borderAllBtn)
self.addAllBtn = QToolButton(self.horizontalWidget9) self.addAllBtn = QToolButton(self.horizontalWidget8)
self.addAllBtn.setObjectName(u"addAllBtn") self.addAllBtn.setObjectName(u"addAllBtn")
sizePolicy2.setHeightForWidth(self.addAllBtn.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.addAllBtn.sizePolicy().hasHeightForWidth())
self.addAllBtn.setSizePolicy(sizePolicy2) self.addAllBtn.setSizePolicy(sizePolicy2)
@@ -2573,7 +2614,7 @@ class Ui_Nugget(object):
self.horizontalLayout_16.addWidget(self.addAllBtn) self.horizontalLayout_16.addWidget(self.addAllBtn)
self.verticalLayout_22.addWidget(self.horizontalWidget9) self.verticalLayout_22.addWidget(self.horizontalWidget8)
self.verticalLayout_23.addWidget(self.themesPageContent) self.verticalLayout_23.addWidget(self.themesPageContent)
@@ -2678,8 +2719,9 @@ class Ui_Nugget(object):
self.internalInstallChk.setText(QCoreApplication.translate("Nugget", u"Set as Apple Internal Install (ie Metal HUD in any app)", None)) self.internalInstallChk.setText(QCoreApplication.translate("Nugget", u"Set as Apple Internal Install (ie Metal HUD in any app)", None))
self.internalStorageChk.setText(QCoreApplication.translate("Nugget", u"Enable Internal Storage (WARNING: risky for some devices, mainly iPads)", None)) self.internalStorageChk.setText(QCoreApplication.translate("Nugget", u"Enable Internal Storage (WARNING: risky for some devices, mainly iPads)", None))
self.collisionSOSChk.setText(QCoreApplication.translate("Nugget", u"Enable Collision SOS", None)) self.collisionSOSChk.setText(QCoreApplication.translate("Nugget", u"Enable Collision SOS", None))
self.sleepApneaChk.setText(QCoreApplication.translate("Nugget", u"Enable Sleep Apnea (real) [for Apple Watches]", None))
self.aodChk.setText(QCoreApplication.translate("Nugget", u"Enable Always On Display", None)) self.aodChk.setText(QCoreApplication.translate("Nugget", u"Enable Always On Display", None))
self.label_10.setText(QCoreApplication.translate("Nugget", u"Custom Gestalt Keys", None))
self.addGestaltKeyBtn.setText(QCoreApplication.translate("Nugget", u" Add Key", None))
self.internalOptionsLbl.setText(QCoreApplication.translate("Nugget", u"Feature Flags", None)) self.internalOptionsLbl.setText(QCoreApplication.translate("Nugget", u"Feature Flags", None))
self.clockAnimChk.setText(QCoreApplication.translate("Nugget", u"Enable Lockscreen Clock Animation", None)) self.clockAnimChk.setText(QCoreApplication.translate("Nugget", u"Enable Lockscreen Clock Animation", None))
self.lockscreenChk.setText(QCoreApplication.translate("Nugget", u"Enable Duplicate Lockscreen Button and Lockscreen Quickswitch", None)) self.lockscreenChk.setText(QCoreApplication.translate("Nugget", u"Enable Duplicate Lockscreen Button and Lockscreen Quickswitch", None))

View File

@@ -0,0 +1,89 @@
from enum import Enum
from json import loads
from .tweak_classes import MobileGestaltTweak
class ValueType(Enum):
Integer = "Integer"
Float = "Float"
String = "String"
Array = "Array"
Dictionary = "Dictionary"
ValueTypeStrings: list[ValueType] = [
ValueType.Integer.value, ValueType.Float.value,
ValueType.String.value,
ValueType.Array.value, ValueType.Dictionary.value
]
class CustomGestaltTweak:
def __init__(self, tweak: MobileGestaltTweak, value_type: ValueType):
self.tweak = tweak
self.value_type = value_type
# TODO: change everything to not return the dict since it is passed by reference
def apply_tweak(self, plist: dict) -> dict:
if self.tweak.key == "":
# key was not set, don't apply (maybe user added it by accident)
return plist
self.tweak.enabled = True
# set the value to be as the specified value type
if self.value_type == ValueType.Integer:
self.tweak.value = int(self.tweak.value)
elif self.value_type == ValueType.Float:
self.tweak.value = float(self.tweak.value)
elif self.value_type == ValueType.Array or self.value_type == ValueType.Dictionary:
# json convert string to array/dict
self.tweak.value = loads(self.tweak.value)
# apply the tweak after updating the value
plist = self.tweak.apply_tweak(plist)
return plist
class CustomGestaltTweaks:
custom_tweaks: list[CustomGestaltTweak] = []
def create_tweak(key: str="", value: str="1", value_type: ValueType = ValueType.Integer) -> int:
new_tweak = MobileGestaltTweak("", key, value=value)
CustomGestaltTweaks.custom_tweaks.append(CustomGestaltTweak(new_tweak, value_type))
# return the tweak id
return len(CustomGestaltTweaks.custom_tweaks) - 1
def set_tweak_key(id: int, key: str):
CustomGestaltTweaks.custom_tweaks[id].tweak.key = key
def set_tweak_value(id: int, value: str):
CustomGestaltTweaks.custom_tweaks[id].tweak.value = value
def set_tweak_value_type(id: int, value_type) -> str:
new_value_type = value_type
if isinstance(value_type, str):
# based on string value
new_value_type = ValueType(value_type)
elif isinstance(value_type, int):
# based on index of the string
new_value_type = ValueType(ValueTypeStrings[value_type])
CustomGestaltTweaks.custom_tweaks[id].value_type = new_value_type
# update the value to be of the new type
new_value = 1
new_str = "1"
if new_value_type == ValueType.Float:
new_value = 1.0
new_str = "1.0"
elif new_value_type == ValueType.String:
new_value = ""
new_str = ""
elif new_value_type == ValueType.Array:
new_value = []
new_str = "[ ]"
elif new_value_type == ValueType.Dictionary:
new_value = {}
new_str = "{ }"
CustomGestaltTweaks.custom_tweaks[id].tweak.value = new_value
return new_str
def apply_tweaks(plist: dict):
for tweak in CustomGestaltTweaks.custom_tweaks:
plist = tweak.apply_tweak(plist)
return plist

View File

@@ -42,7 +42,7 @@ tweaks = {
## AI Enabler ## AI Enabler
"AIEligibility": AITweak(), "AIEligibility": AITweak(),
"AIGestalt": MobileGestaltTweak("Enable Apple Intelligence (for Unsupported Devices) (Gestalt)", "A62OafQ85EJAiiqKn4agtg", min_version=Version("18.1")), "AIGestalt": MobileGestaltTweak("Enable Apple Intelligence (for Unsupported Devices) (Gestalt)", "A62OafQ85EJAiiqKn4agtg", min_version=Version("18.1")),
"SpoofModel": MobileGestaltPickerTweak("Spoofed Device Model", "h9jDsbgj7xIVeIQ8S3/X3Q", ["iPhone16,2", "iPhone17,3", "iPhone17,4", "iPad16,3"], min_version=Version("18.1"), divider_below=True), "SpoofModel": MobileGestaltPickerTweak("Spoofed Device Model", "h9jDsbgj7xIVeIQ8S3/X3Q", values=["iPhone16,2", "iPhone17,3", "iPhone17,4", "iPad16,3"], min_version=Version("18.1"), divider_below=True),
## Springboard Tweaks ## Springboard Tweaks
"LockScreenFootnote": BasicPlistTweak( "LockScreenFootnote": BasicPlistTweak(