mirror of
https://github.com/leminlimez/Nugget.git
synced 2025-04-08 04:23:05 +08:00
add posterboard help menu
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from PySide6.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout, QWidget, QToolButton, QSizePolicy
|
||||
from PySide6.QtGui import QFont
|
||||
from PySide6.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout, QHBoxLayout, QWidget, QToolButton, QSizePolicy
|
||||
from PySide6.QtGui import QFont, QIcon, QPixmap
|
||||
from PySide6.QtCore import QSize
|
||||
|
||||
from webbrowser import open_new_tab
|
||||
|
||||
@@ -40,15 +41,31 @@ class PBHelpDialog(QDialog):
|
||||
)
|
||||
self.buttonBox = QDialogButtonBox(QBtn)
|
||||
self.buttonBox.accepted.connect(self.accept)
|
||||
self.setWindowTitle("PosterBoard Info")
|
||||
|
||||
layout = QVBoxLayout()
|
||||
message = QLabel("Descriptors will be under the Collections section when adding a new wallpaper.")
|
||||
layout.addWidget(message)
|
||||
|
||||
imgContainer = QWidget()
|
||||
imgContainer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
|
||||
imgContainer.setStyleSheet("QWidget { border: none; }")
|
||||
# tut1 = QToolButton()
|
||||
imgBox = QWidget()
|
||||
imgBox.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
|
||||
imgBox.setStyleSheet("QWidget { background: none; padding: 0px; border: none; }")
|
||||
hlayout = QHBoxLayout()
|
||||
tut1 = QToolButton()
|
||||
tut1.setIconSize(QSize(138, 300))
|
||||
tut1.setStyleSheet("QToolButton { background: none; padding: 0px; border: none; }")
|
||||
tut1.setIcon(QIcon(QPixmap(":/gui/pb_tutorial1.png")))
|
||||
hlayout.addWidget(tut1)
|
||||
tut2 = QToolButton()
|
||||
tut2.setIconSize(QSize(138, 300))
|
||||
tut2.setStyleSheet("QToolButton { background: none; padding: 0px; border: none; }")
|
||||
tut2.setIcon(QIcon(QPixmap(":/gui/pb_tutorial2.png")))
|
||||
hlayout.addWidget(tut2)
|
||||
imgBox.setLayout(hlayout)
|
||||
|
||||
layout.addWidget(imgBox)
|
||||
layout.addWidget(self.buttonBox)
|
||||
self.setLayout(layout)
|
||||
|
||||
|
||||
class UpdateAppDialog(QDialog):
|
||||
|
||||
@@ -12,7 +12,7 @@ from controllers.web_request_handler import is_update_available
|
||||
from devicemanagement.constants import Version
|
||||
from devicemanagement.device_manager import DeviceManager
|
||||
|
||||
from gui.dialogs import GestaltDialog, UpdateAppDialog
|
||||
from gui.dialogs import GestaltDialog, UpdateAppDialog, PBHelpDialog
|
||||
|
||||
from tweaks.tweaks import tweaks
|
||||
from tweaks.custom_gestalt_tweaks import CustomGestaltTweaks, ValueTypeStrings
|
||||
@@ -165,6 +165,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
self.ui.resetPRBExtBtn.clicked.connect(self.on_resetPRBExtBtn_clicked)
|
||||
self.ui.deleteAllDescriptorsBtn.clicked.connect(self.on_deleteAllDescriptorsBtn_clicked)
|
||||
self.ui.findPBBtn.clicked.connect(self.on_findPBBtn_clicked)
|
||||
self.ui.pbHelpBtn.clicked.connect(self.on_pbHelpBtn_clicked)
|
||||
|
||||
## RISKY OPTIONS PAGE ACTIONS
|
||||
self.ui.disableOTAChk.toggled.connect(self.on_disableOTAChk_clicked)
|
||||
@@ -947,6 +948,10 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
def on_findPBBtn_clicked(self):
|
||||
webbrowser.open_new_tab("https://cowabun.ga/wallpapers")
|
||||
|
||||
def on_pbHelpBtn_clicked(self):
|
||||
dialog = PBHelpDialog()
|
||||
dialog.exec()
|
||||
|
||||
|
||||
## Risky Options Page
|
||||
def on_disableOTAChk_clicked(self, checked: bool):
|
||||
|
||||
Reference in New Issue
Block a user