mirror of
https://github.com/leminlimez/Nugget.git
synced 2025-04-08 04:23:05 +08:00
allow for auto reversing video
This commit is contained in:
@@ -42,11 +42,14 @@ def get_thumbnail_from_contents(contents: bytes, output_file: str = None):
|
||||
contents = get_thumbnail_from_mov(inp_file.name, output_file)
|
||||
return contents
|
||||
|
||||
def create_caml(video_path: str, output_file: str, update_label=lambda x: None):
|
||||
def create_caml(video_path: str, output_file: str, auto_reverses: bool, update_label=lambda x: None):
|
||||
cam = cv2.VideoCapture(video_path)
|
||||
assets_path = os.path.join(output_file, "assets")
|
||||
frame_count = int(cam.get(cv2.CAP_PROP_FRAME_COUNT))
|
||||
FRAME_LIMIT = 300
|
||||
reverse = 0
|
||||
if auto_reverses:
|
||||
reverse = 1
|
||||
if frame_count > FRAME_LIMIT:
|
||||
raise Exception(f"Videos must be under {FRAME_LIMIT} fps to loop. Either reduce the frame rate or make it shorter.")
|
||||
try:
|
||||
@@ -76,7 +79,7 @@ def create_caml(video_path: str, output_file: str, update_label=lambda x: None):
|
||||
<CALayer allowsEdgeAntialiasing="1" allowsGroupOpacity="1" bounds="0 0 {width} {height}" contentsFormat="RGBA8" cornerCurve="circular" name="CALayer1" position="{int(width/2)} {int(height/2)}">
|
||||
<contents type="CGImage" src="assets/0.jpg"/>
|
||||
<animations>
|
||||
<animation type="CAKeyframeAnimation" calculationMode="linear" keyPath="contents" beginTime="1e-100" duration="{duration}" removedOnCompletion="0" repeatCount="inf" repeatDuration="0" speed="1" timeOffset="0">
|
||||
<animation type="CAKeyframeAnimation" calculationMode="linear" keyPath="contents" beginTime="1e-100" duration="{duration}" removedOnCompletion="0" repeatCount="inf" repeatDuration="0" speed="1" timeOffset="0" autoreverses="{reverse}">
|
||||
<values>\n""")
|
||||
while(True):
|
||||
# reading from frame
|
||||
|
||||
@@ -177,6 +177,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
self.ui.chooseVideoBtn.clicked.connect(self.on_chooseVideoBtn_clicked)
|
||||
self.ui.clearSuggestedBtn.clicked.connect(self.on_clearSuggestedBtn_clicked)
|
||||
self.ui.caVideoChk.toggled.connect(self.on_caVideoChk_toggled)
|
||||
self.ui.reverseLoopChk.toggled.connect(self.on_reverseLoopChk_toggled)
|
||||
self.ui.reverseLoopChk.hide() # hide by default
|
||||
|
||||
self.ui.findPBBtn.clicked.connect(self.on_findPBBtn_clicked)
|
||||
self.ui.pbHelpBtn.clicked.connect(self.on_pbHelpBtn_clicked)
|
||||
@@ -1014,10 +1016,14 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
self.ui.chooseThumbBtn.hide()
|
||||
self.ui.pbVideoThumbLbl.hide()
|
||||
self.ui.clearSuggestedBtn.hide()
|
||||
self.ui.reverseLoopChk.show()
|
||||
else:
|
||||
self.ui.chooseThumbBtn.show()
|
||||
self.ui.pbVideoThumbLbl.show()
|
||||
self.ui.clearSuggestedBtn.show()
|
||||
self.ui.reverseLoopChk.hide()
|
||||
def on_reverseLoopChk_toggled(self, checked: bool):
|
||||
tweaks["PosterBoard"].reverse_video = checked
|
||||
|
||||
def on_findPBBtn_clicked(self):
|
||||
webbrowser.open_new_tab("https://cowabun.ga/wallpapers")
|
||||
|
||||
@@ -450,6 +450,38 @@ QSlider::tick:horizontal {
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="posterboardPageBtn">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> Posterboard</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icon/wallpaper.svg</normaloff>:/icon/wallpaper.svg</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="cls" stdset="0">
|
||||
<string>sidebarBtn</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="gestaltPageBtn">
|
||||
<property name="sizePolicy">
|
||||
@@ -642,38 +674,6 @@ QSlider::tick:horizontal {
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="posterboardPageBtn">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> Posterboard</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icon/wallpaper.svg</normaloff>:/icon/wallpaper.svg</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="cls" stdset="0">
|
||||
<string>sidebarBtn</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="advancedPageBtn">
|
||||
<property name="sizePolicy">
|
||||
|
||||
@@ -317,13 +317,27 @@ class Ui_Nugget(object):
|
||||
|
||||
self.verticalLayout.addWidget(self.sidebarDiv1)
|
||||
|
||||
self.posterboardPageBtn = QToolButton(self.sidebar)
|
||||
self.posterboardPageBtn.setObjectName(u"posterboardPageBtn")
|
||||
self.posterboardPageBtn.setEnabled(True)
|
||||
sizePolicy2.setHeightForWidth(self.posterboardPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.posterboardPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon3 = QIcon()
|
||||
icon3.addFile(u":/icon/wallpaper.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.posterboardPageBtn.setIcon(icon3)
|
||||
self.posterboardPageBtn.setCheckable(True)
|
||||
self.posterboardPageBtn.setAutoExclusive(True)
|
||||
self.posterboardPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
|
||||
self.verticalLayout.addWidget(self.posterboardPageBtn)
|
||||
|
||||
self.gestaltPageBtn = QToolButton(self.sidebar)
|
||||
self.gestaltPageBtn.setObjectName(u"gestaltPageBtn")
|
||||
sizePolicy2.setHeightForWidth(self.gestaltPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.gestaltPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon3 = QIcon()
|
||||
icon3.addFile(u":/icon/iphone-island.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.gestaltPageBtn.setIcon(icon3)
|
||||
icon4 = QIcon()
|
||||
icon4.addFile(u":/icon/iphone-island.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.gestaltPageBtn.setIcon(icon4)
|
||||
self.gestaltPageBtn.setIconSize(QSize(24, 28))
|
||||
self.gestaltPageBtn.setCheckable(True)
|
||||
self.gestaltPageBtn.setAutoExclusive(True)
|
||||
@@ -339,9 +353,9 @@ class Ui_Nugget(object):
|
||||
font = QFont()
|
||||
font.setFamilies([u".AppleSystemUIFont"])
|
||||
self.featureFlagsPageBtn.setFont(font)
|
||||
icon4 = QIcon()
|
||||
icon4.addFile(u":/icon/flag.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.featureFlagsPageBtn.setIcon(icon4)
|
||||
icon5 = QIcon()
|
||||
icon5.addFile(u":/icon/flag.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.featureFlagsPageBtn.setIcon(icon5)
|
||||
self.featureFlagsPageBtn.setCheckable(True)
|
||||
self.featureFlagsPageBtn.setAutoExclusive(True)
|
||||
self.featureFlagsPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
@@ -352,9 +366,9 @@ class Ui_Nugget(object):
|
||||
self.euEnablerPageBtn.setObjectName(u"euEnablerPageBtn")
|
||||
sizePolicy2.setHeightForWidth(self.euEnablerPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.euEnablerPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon5 = QIcon()
|
||||
icon5.addFile(u":/icon/geo-alt.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.euEnablerPageBtn.setIcon(icon5)
|
||||
icon6 = QIcon()
|
||||
icon6.addFile(u":/icon/geo-alt.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.euEnablerPageBtn.setIcon(icon6)
|
||||
self.euEnablerPageBtn.setCheckable(True)
|
||||
self.euEnablerPageBtn.setAutoExclusive(True)
|
||||
self.euEnablerPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
@@ -365,9 +379,9 @@ class Ui_Nugget(object):
|
||||
self.springboardOptionsPageBtn.setObjectName(u"springboardOptionsPageBtn")
|
||||
sizePolicy2.setHeightForWidth(self.springboardOptionsPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.springboardOptionsPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon6 = QIcon()
|
||||
icon6.addFile(u":/icon/app-indicator.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.springboardOptionsPageBtn.setIcon(icon6)
|
||||
icon7 = QIcon()
|
||||
icon7.addFile(u":/icon/app-indicator.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.springboardOptionsPageBtn.setIcon(icon7)
|
||||
self.springboardOptionsPageBtn.setCheckable(True)
|
||||
self.springboardOptionsPageBtn.setAutoExclusive(True)
|
||||
self.springboardOptionsPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
@@ -378,9 +392,9 @@ class Ui_Nugget(object):
|
||||
self.internalOptionsPageBtn.setObjectName(u"internalOptionsPageBtn")
|
||||
sizePolicy2.setHeightForWidth(self.internalOptionsPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.internalOptionsPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon7 = QIcon()
|
||||
icon7.addFile(u":/icon/hdd.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.internalOptionsPageBtn.setIcon(icon7)
|
||||
icon8 = QIcon()
|
||||
icon8.addFile(u":/icon/hdd.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.internalOptionsPageBtn.setIcon(icon8)
|
||||
self.internalOptionsPageBtn.setCheckable(True)
|
||||
self.internalOptionsPageBtn.setAutoExclusive(True)
|
||||
self.internalOptionsPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
@@ -392,29 +406,15 @@ class Ui_Nugget(object):
|
||||
self.daemonsPageBtn.setEnabled(True)
|
||||
sizePolicy2.setHeightForWidth(self.daemonsPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.daemonsPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon8 = QIcon()
|
||||
icon8.addFile(u":/icon/toggles.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.daemonsPageBtn.setIcon(icon8)
|
||||
icon9 = QIcon()
|
||||
icon9.addFile(u":/icon/toggles.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.daemonsPageBtn.setIcon(icon9)
|
||||
self.daemonsPageBtn.setCheckable(True)
|
||||
self.daemonsPageBtn.setAutoExclusive(True)
|
||||
self.daemonsPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
|
||||
self.verticalLayout.addWidget(self.daemonsPageBtn)
|
||||
|
||||
self.posterboardPageBtn = QToolButton(self.sidebar)
|
||||
self.posterboardPageBtn.setObjectName(u"posterboardPageBtn")
|
||||
self.posterboardPageBtn.setEnabled(True)
|
||||
sizePolicy2.setHeightForWidth(self.posterboardPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.posterboardPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon9 = QIcon()
|
||||
icon9.addFile(u":/icon/wallpaper.svg", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
self.posterboardPageBtn.setIcon(icon9)
|
||||
self.posterboardPageBtn.setCheckable(True)
|
||||
self.posterboardPageBtn.setAutoExclusive(True)
|
||||
self.posterboardPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
|
||||
self.verticalLayout.addWidget(self.posterboardPageBtn)
|
||||
|
||||
self.advancedPageBtn = QToolButton(self.sidebar)
|
||||
self.advancedPageBtn.setObjectName(u"advancedPageBtn")
|
||||
sizePolicy2.setHeightForWidth(self.advancedPageBtn.sizePolicy().hasHeightForWidth())
|
||||
@@ -946,7 +946,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_8.setIcon(icon3)
|
||||
self.toolButton_8.setIcon(icon4)
|
||||
self.toolButton_8.setIconSize(QSize(30, 30))
|
||||
|
||||
self.horizontalLayout_5.addWidget(self.toolButton_8)
|
||||
@@ -1289,7 +1289,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_10.setIcon(icon4)
|
||||
self.toolButton_10.setIcon(icon5)
|
||||
|
||||
self.horizontalLayout_20.addWidget(self.toolButton_10)
|
||||
|
||||
@@ -1395,7 +1395,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_11.setIcon(icon5)
|
||||
self.toolButton_11.setIcon(icon6)
|
||||
|
||||
self.horizontalLayout_21.addWidget(self.toolButton_11)
|
||||
|
||||
@@ -1700,7 +1700,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_7.setIcon(icon6)
|
||||
self.toolButton_7.setIcon(icon7)
|
||||
|
||||
self.horizontalLayout_13.addWidget(self.toolButton_7)
|
||||
|
||||
@@ -1826,7 +1826,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_101.setIcon(icon7)
|
||||
self.toolButton_101.setIcon(icon8)
|
||||
|
||||
self.horizontalLayout_201.addWidget(self.toolButton_101)
|
||||
|
||||
@@ -2007,7 +2007,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_102.setIcon(icon8)
|
||||
self.toolButton_102.setIcon(icon9)
|
||||
|
||||
self.horizontalLayout_202.addWidget(self.toolButton_102)
|
||||
|
||||
@@ -2198,7 +2198,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_103.setIcon(icon9)
|
||||
self.toolButton_103.setIcon(icon3)
|
||||
|
||||
self.horizontalLayout_203.addWidget(self.toolButton_103)
|
||||
|
||||
@@ -3022,7 +3022,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_13.setIcon(icon5)
|
||||
self.toolButton_13.setIcon(icon6)
|
||||
|
||||
self.horizontalLayout_28.addWidget(self.toolButton_13)
|
||||
|
||||
@@ -3355,7 +3355,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.themesBtn.setIcon(icon3)
|
||||
self.themesBtn.setIcon(icon4)
|
||||
self.themesBtn.setIconSize(QSize(30, 30))
|
||||
|
||||
self.horizontalLayout_23.addWidget(self.themesBtn)
|
||||
@@ -3519,6 +3519,8 @@ class Ui_Nugget(object):
|
||||
self.titleBar.setText(QCoreApplication.translate("Nugget", u"Nugget", None))
|
||||
self.homePageBtn.setText(QCoreApplication.translate("Nugget", u" Home", None))
|
||||
self.homePageBtn.setProperty(u"cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.posterboardPageBtn.setText(QCoreApplication.translate("Nugget", u" Posterboard", None))
|
||||
self.posterboardPageBtn.setProperty(u"cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.gestaltPageBtn.setText(QCoreApplication.translate("Nugget", u" Mobile Gestalt", None))
|
||||
self.gestaltPageBtn.setProperty(u"cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.featureFlagsPageBtn.setText(QCoreApplication.translate("Nugget", u" Feature Flags", None))
|
||||
@@ -3531,8 +3533,6 @@ class Ui_Nugget(object):
|
||||
self.internalOptionsPageBtn.setProperty(u"cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.daemonsPageBtn.setText(QCoreApplication.translate("Nugget", u" Daemons", None))
|
||||
self.daemonsPageBtn.setProperty(u"cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.posterboardPageBtn.setText(QCoreApplication.translate("Nugget", u" Posterboard", None))
|
||||
self.posterboardPageBtn.setProperty(u"cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.advancedPageBtn.setText(QCoreApplication.translate("Nugget", u" Risky Options", None))
|
||||
self.advancedPageBtn.setProperty(u"cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.applyPageBtn.setText(QCoreApplication.translate("Nugget", u" Apply", None))
|
||||
|
||||
@@ -317,13 +317,27 @@ class Ui_Nugget(object):
|
||||
|
||||
self.verticalLayout.addWidget(self.sidebarDiv1)
|
||||
|
||||
self.posterboardPageBtn = QToolButton(self.sidebar)
|
||||
self.posterboardPageBtn.setObjectName(u"posterboardPageBtn")
|
||||
self.posterboardPageBtn.setEnabled(True)
|
||||
sizePolicy2.setHeightForWidth(self.posterboardPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.posterboardPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon3 = QIcon()
|
||||
icon3.addFile(u":/icon/wallpaper.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.posterboardPageBtn.setIcon(icon3)
|
||||
self.posterboardPageBtn.setCheckable(True)
|
||||
self.posterboardPageBtn.setAutoExclusive(True)
|
||||
self.posterboardPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
|
||||
self.verticalLayout.addWidget(self.posterboardPageBtn)
|
||||
|
||||
self.gestaltPageBtn = QToolButton(self.sidebar)
|
||||
self.gestaltPageBtn.setObjectName(u"gestaltPageBtn")
|
||||
sizePolicy2.setHeightForWidth(self.gestaltPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.gestaltPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon3 = QIcon()
|
||||
icon3.addFile(u":/icon/iphone-island.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.gestaltPageBtn.setIcon(icon3)
|
||||
icon4 = QIcon()
|
||||
icon4.addFile(u":/icon/iphone-island.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.gestaltPageBtn.setIcon(icon4)
|
||||
self.gestaltPageBtn.setIconSize(QSize(24, 28))
|
||||
self.gestaltPageBtn.setCheckable(True)
|
||||
self.gestaltPageBtn.setAutoExclusive(True)
|
||||
@@ -339,9 +353,9 @@ class Ui_Nugget(object):
|
||||
font = QFont()
|
||||
font.setFamilies([u".AppleSystemUIFont"])
|
||||
self.featureFlagsPageBtn.setFont(font)
|
||||
icon4 = QIcon()
|
||||
icon4.addFile(u":/icon/flag.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.featureFlagsPageBtn.setIcon(icon4)
|
||||
icon5 = QIcon()
|
||||
icon5.addFile(u":/icon/flag.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.featureFlagsPageBtn.setIcon(icon5)
|
||||
self.featureFlagsPageBtn.setCheckable(True)
|
||||
self.featureFlagsPageBtn.setAutoExclusive(True)
|
||||
self.featureFlagsPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
@@ -352,9 +366,9 @@ class Ui_Nugget(object):
|
||||
self.euEnablerPageBtn.setObjectName(u"euEnablerPageBtn")
|
||||
sizePolicy2.setHeightForWidth(self.euEnablerPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.euEnablerPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon5 = QIcon()
|
||||
icon5.addFile(u":/icon/geo-alt.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.euEnablerPageBtn.setIcon(icon5)
|
||||
icon6 = QIcon()
|
||||
icon6.addFile(u":/icon/geo-alt.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.euEnablerPageBtn.setIcon(icon6)
|
||||
self.euEnablerPageBtn.setCheckable(True)
|
||||
self.euEnablerPageBtn.setAutoExclusive(True)
|
||||
self.euEnablerPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
@@ -365,9 +379,9 @@ class Ui_Nugget(object):
|
||||
self.springboardOptionsPageBtn.setObjectName(u"springboardOptionsPageBtn")
|
||||
sizePolicy2.setHeightForWidth(self.springboardOptionsPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.springboardOptionsPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon6 = QIcon()
|
||||
icon6.addFile(u":/icon/app-indicator.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.springboardOptionsPageBtn.setIcon(icon6)
|
||||
icon7 = QIcon()
|
||||
icon7.addFile(u":/icon/app-indicator.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.springboardOptionsPageBtn.setIcon(icon7)
|
||||
self.springboardOptionsPageBtn.setCheckable(True)
|
||||
self.springboardOptionsPageBtn.setAutoExclusive(True)
|
||||
self.springboardOptionsPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
@@ -378,9 +392,9 @@ class Ui_Nugget(object):
|
||||
self.internalOptionsPageBtn.setObjectName(u"internalOptionsPageBtn")
|
||||
sizePolicy2.setHeightForWidth(self.internalOptionsPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.internalOptionsPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon7 = QIcon()
|
||||
icon7.addFile(u":/icon/hdd.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.internalOptionsPageBtn.setIcon(icon7)
|
||||
icon8 = QIcon()
|
||||
icon8.addFile(u":/icon/hdd.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.internalOptionsPageBtn.setIcon(icon8)
|
||||
self.internalOptionsPageBtn.setCheckable(True)
|
||||
self.internalOptionsPageBtn.setAutoExclusive(True)
|
||||
self.internalOptionsPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
@@ -392,29 +406,15 @@ class Ui_Nugget(object):
|
||||
self.daemonsPageBtn.setEnabled(True)
|
||||
sizePolicy2.setHeightForWidth(self.daemonsPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.daemonsPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon8 = QIcon()
|
||||
icon8.addFile(u":/icon/toggles.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.daemonsPageBtn.setIcon(icon8)
|
||||
icon9 = QIcon()
|
||||
icon9.addFile(u":/icon/toggles.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.daemonsPageBtn.setIcon(icon9)
|
||||
self.daemonsPageBtn.setCheckable(True)
|
||||
self.daemonsPageBtn.setAutoExclusive(True)
|
||||
self.daemonsPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
|
||||
self.verticalLayout.addWidget(self.daemonsPageBtn)
|
||||
|
||||
self.posterboardPageBtn = QToolButton(self.sidebar)
|
||||
self.posterboardPageBtn.setObjectName(u"posterboardPageBtn")
|
||||
self.posterboardPageBtn.setEnabled(True)
|
||||
sizePolicy2.setHeightForWidth(self.posterboardPageBtn.sizePolicy().hasHeightForWidth())
|
||||
self.posterboardPageBtn.setSizePolicy(sizePolicy2)
|
||||
icon9 = QIcon()
|
||||
icon9.addFile(u":/icon/wallpaper.svg", QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.posterboardPageBtn.setIcon(icon9)
|
||||
self.posterboardPageBtn.setCheckable(True)
|
||||
self.posterboardPageBtn.setAutoExclusive(True)
|
||||
self.posterboardPageBtn.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
|
||||
self.verticalLayout.addWidget(self.posterboardPageBtn)
|
||||
|
||||
self.advancedPageBtn = QToolButton(self.sidebar)
|
||||
self.advancedPageBtn.setObjectName(u"advancedPageBtn")
|
||||
sizePolicy2.setHeightForWidth(self.advancedPageBtn.sizePolicy().hasHeightForWidth())
|
||||
@@ -946,7 +946,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_8.setIcon(icon3)
|
||||
self.toolButton_8.setIcon(icon4)
|
||||
self.toolButton_8.setIconSize(QSize(30, 30))
|
||||
|
||||
self.horizontalLayout_5.addWidget(self.toolButton_8)
|
||||
@@ -1289,7 +1289,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_10.setIcon(icon4)
|
||||
self.toolButton_10.setIcon(icon5)
|
||||
|
||||
self.horizontalLayout_20.addWidget(self.toolButton_10)
|
||||
|
||||
@@ -1395,7 +1395,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_11.setIcon(icon5)
|
||||
self.toolButton_11.setIcon(icon6)
|
||||
|
||||
self.horizontalLayout_21.addWidget(self.toolButton_11)
|
||||
|
||||
@@ -1700,7 +1700,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_7.setIcon(icon6)
|
||||
self.toolButton_7.setIcon(icon7)
|
||||
|
||||
self.horizontalLayout_13.addWidget(self.toolButton_7)
|
||||
|
||||
@@ -1826,7 +1826,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_101.setIcon(icon7)
|
||||
self.toolButton_101.setIcon(icon8)
|
||||
|
||||
self.horizontalLayout_201.addWidget(self.toolButton_101)
|
||||
|
||||
@@ -2007,7 +2007,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_102.setIcon(icon8)
|
||||
self.toolButton_102.setIcon(icon9)
|
||||
|
||||
self.horizontalLayout_202.addWidget(self.toolButton_102)
|
||||
|
||||
@@ -2198,7 +2198,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_103.setIcon(icon9)
|
||||
self.toolButton_103.setIcon(icon3)
|
||||
|
||||
self.horizontalLayout_203.addWidget(self.toolButton_103)
|
||||
|
||||
@@ -3022,7 +3022,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.toolButton_13.setIcon(icon5)
|
||||
self.toolButton_13.setIcon(icon6)
|
||||
|
||||
self.horizontalLayout_28.addWidget(self.toolButton_13)
|
||||
|
||||
@@ -3355,7 +3355,7 @@ class Ui_Nugget(object):
|
||||
" padding-right: 5px;\n"
|
||||
" border-radius: 0px;\n"
|
||||
"}")
|
||||
self.themesBtn.setIcon(icon3)
|
||||
self.themesBtn.setIcon(icon4)
|
||||
self.themesBtn.setIconSize(QSize(30, 30))
|
||||
|
||||
self.horizontalLayout_23.addWidget(self.themesBtn)
|
||||
@@ -3519,6 +3519,8 @@ class Ui_Nugget(object):
|
||||
self.titleBar.setText(QCoreApplication.translate("Nugget", u"Nugget", None))
|
||||
self.homePageBtn.setText(QCoreApplication.translate("Nugget", u" Home", None))
|
||||
self.homePageBtn.setProperty("cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.posterboardPageBtn.setText(QCoreApplication.translate("Nugget", u" Posterboard", None))
|
||||
self.posterboardPageBtn.setProperty("cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.gestaltPageBtn.setText(QCoreApplication.translate("Nugget", u" Mobile Gestalt", None))
|
||||
self.gestaltPageBtn.setProperty("cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.featureFlagsPageBtn.setText(QCoreApplication.translate("Nugget", u" Feature Flags", None))
|
||||
@@ -3531,8 +3533,6 @@ class Ui_Nugget(object):
|
||||
self.internalOptionsPageBtn.setProperty("cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.daemonsPageBtn.setText(QCoreApplication.translate("Nugget", u" Daemons", None))
|
||||
self.daemonsPageBtn.setProperty("cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.posterboardPageBtn.setText(QCoreApplication.translate("Nugget", u" Posterboard", None))
|
||||
self.posterboardPageBtn.setProperty("cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.advancedPageBtn.setText(QCoreApplication.translate("Nugget", u" Risky Options", None))
|
||||
self.advancedPageBtn.setProperty("cls", QCoreApplication.translate("Nugget", u"sidebarBtn", None))
|
||||
self.applyPageBtn.setText(QCoreApplication.translate("Nugget", u" Apply", None))
|
||||
|
||||
@@ -67,6 +67,7 @@ class PosterboardTweak(Tweak):
|
||||
self.videoThumbnail = None
|
||||
self.videoFile = None
|
||||
self.loop_video = False
|
||||
self.reverse_video = False
|
||||
self.bundle_id = "com.apple.PosterBoard"
|
||||
self.resetting = False
|
||||
self.resetType = 0 # 0 for descriptor, 1 for prb, 2 for suggested photos
|
||||
@@ -213,7 +214,7 @@ class PosterboardTweak(Tweak):
|
||||
copytree(source_dir, video_output_dir, dirs_exist_ok=True)
|
||||
contents_path = os.path.join(video_output_dir, "versions/1/contents/9183.Custom-810w-1080h@2x~ipad.wallpaper/9183.Custom_Background-810w-1080h@2x~ipad.ca")
|
||||
print(f"path at {contents_path}, creating caml")
|
||||
video_handler.create_caml(video_path=self.videoFile, output_file=contents_path, update_label=update_label)
|
||||
video_handler.create_caml(video_path=self.videoFile, output_file=contents_path, auto_reverses=self.reverse_video, update_label=update_label)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user