From 0c11c2f2908d1405c8325cb2fb0ab8deb6df6f9c Mon Sep 17 00:00:00 2001 From: NinjaCheetah <58050615+NinjaCheetah@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:36:34 -0400 Subject: [PATCH] Updated TreeView so that long names cause a horizontal scroll bar to appear --- NUSD-Py.py | 4 ++- qt/py/ui_MainMenu.py | 11 ++++--- qt/ui/MainMenu.ui | 15 +++++++-- wii-database.json | 77 ++++++++++++++++++++++++++++++-------------- 4 files changed, 75 insertions(+), 32 deletions(-) diff --git a/NUSD-Py.py b/NUSD-Py.py index 53aff7c..32ace70 100644 --- a/NUSD-Py.py +++ b/NUSD-Py.py @@ -5,7 +5,7 @@ import pathlib import libWiiPy -from PySide6.QtWidgets import QApplication, QMainWindow, QMessageBox, QTreeWidgetItem +from PySide6.QtWidgets import QApplication, QMainWindow, QMessageBox, QTreeWidgetItem, QHeaderView from PySide6.QtCore import QRunnable, Slot, QThreadPool, Signal, QObject from qt.py.ui_MainMenu import Ui_MainWindow @@ -46,6 +46,8 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.threadpool = QThreadPool() self.ui.download_btn.clicked.connect(self.download_btn_pressed) self.ui.pack_wad_chkbox.clicked.connect(self.pack_wad_chkbox_toggled) + # noinspection PyUnresolvedReferences + self.ui.title_tree.header().setSectionResizeMode(QHeaderView.ResizeToContents) self.ui.log_text_browser.setText("NUSD-Py v1.0\nDeveloped by NinjaCheetah\nPowered by libWiiPy\n\n" "Select a title from the list on the left, or enter a Title ID to begin.") diff --git a/qt/py/ui_MainMenu.py b/qt/py/ui_MainMenu.py index 3b46162..d7d0994 100644 --- a/qt/py/ui_MainMenu.py +++ b/qt/py/ui_MainMenu.py @@ -3,7 +3,7 @@ ################################################################################ ## Form generated from reading UI file 'MainMenu.ui' ## -## Created by: Qt User Interface Compiler version 6.6.3 +## Created by: Qt User Interface Compiler version 6.7.0 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ################################################################################ @@ -48,6 +48,9 @@ class Ui_MainWindow(object): self.title_tree.setObjectName(u"title_tree") self.title_tree.setColumnCount(1) self.title_tree.header().setVisible(False) + self.title_tree.header().setMinimumSectionSize(49) + self.title_tree.header().setDefaultSectionSize(100) + self.title_tree.header().setStretchLastSection(False) self.verticalLayout.addWidget(self.title_tree) @@ -126,7 +129,7 @@ class Ui_MainWindow(object): MainWindow.setCentralWidget(self.centralwidget) self.menubar = QMenuBar(MainWindow) self.menubar.setObjectName(u"menubar") - self.menubar.setGeometry(QRect(0, 0, 610, 29)) + self.menubar.setGeometry(QRect(0, 0, 610, 30)) MainWindow.setMenuBar(self.menubar) self.statusbar = QStatusBar(MainWindow) self.statusbar.setObjectName(u"statusbar") @@ -149,8 +152,8 @@ class Ui_MainWindow(object): self.log_text_browser.setHtml(QCoreApplication.translate("MainWindow", u"\n" "\n" -"


", None)) +"\n" +"


", None)) self.pack_wad_chkbox.setText(QCoreApplication.translate("MainWindow", u"Pack WAD", None)) self.wad_file_entry.setPlaceholderText(QCoreApplication.translate("MainWindow", u"File Name", None)) self.keep_enc_chkbox.setText(QCoreApplication.translate("MainWindow", u"Keep Enc. Contents", None)) diff --git a/qt/ui/MainMenu.ui b/qt/ui/MainMenu.ui index 2538351..0162eff 100644 --- a/qt/ui/MainMenu.ui +++ b/qt/ui/MainMenu.ui @@ -50,6 +50,15 @@ false + + 49 + + + 100 + + + false + 1 @@ -111,8 +120,8 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> +</style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;"><br /></p></body></html> @@ -174,7 +183,7 @@ p, li { white-space: pre-wrap; } 0 0 610 - 29 + 30 diff --git a/wii-database.json b/wii-database.json index 06c56fb..e025ae3 100644 --- a/wii-database.json +++ b/wii-database.json @@ -1,27 +1,13 @@ { "System": [ { - "Name": "boot2", - "TID": "0000000100000001", + "Name": "BBC iPlayer Channel", + "TID": "0001000148434AXX", "Versions": { - "World": [4] + "EUR": [768] }, - "Ticket": true, - "WAD Name": "boot2-NUS", - "Danger": "boot2 is a critical part of the Wii's boot process, and should not be modified. You're also likely to already be running boot2v4, which is the only version of boot2 available on the NUS." - }, - { - "Name": "System Menu", - "TID": "0000000100000002", - "Versions": { - "USA": [97, 193, 225, 257, 289, 353, 385, 417, 449, 481, 513], - "EUR": [130, 162, 194, 226, 258, 290, 354, 386, 418, 450, 482, 514], - "JAP": [128, 192, 224, 256, 288, 352, 384, 416, 448, 480, 512], - "KOR": [390, 454, 486, 518] - }, - "Ticket": true, - "WAD Name": "RVL-WiiSystemmenu", - "Danger": "The System Menu is a critical part of the Wii's operation, and should not be modified without proper brick prevention in place. You should have BootMii installed as boot2 if possible, and if not, Priiloader installed before making changes to the System Menu." + "Ticket": false, + "WAD Name": "BBC-iPlayer-Channel-NUS" }, { "Name": "BC", @@ -34,14 +20,34 @@ "Danger": "BC is required for the Wii's backwards compatibility with the GameCube. GameCube games will not run properly if BC is damaged or not present." }, { - "Name": "MIOS", - "TID": "0000000100000101", + "Name": "boot2", + "TID": "0000000100000001", "Versions": { - "World": [4, 5, 8, 9, 10] + "World": [4] }, "Ticket": true, - "WAD Name": "MIOS-NUS", - "Danger": "MIOS is required for the Wii's backwards compatibility with the GameCube. GameCube games will not run properly if MIOS is damaged or not present." + "WAD Name": "boot2-NUS", + "Danger": "boot2 is a critical part of the Wii's boot process, and should not be modified. You're also likely to already be running boot2v4, which is the only version of boot2 available on the NUS." + }, + { + "Name": "Check Mii Out Channel", + "TID": "00010001484150XX", + "Versions": { + "USA": [1, 3, 512], + "EUR": [1, 3, 512], + "JAP": [1, 3, 512] + }, + "Ticket": false, + "WAD Name": "Check-Mii-Out-Channel-NUS" + }, + { + "Name": "Digicam Print Channel", + "TID": "00010001484344XX", + "Versions": { + "JAP": [1024] + }, + "Ticket": true, + "WAD Name": "Digicam-Print-Channel-NUS" }, { "Name": "EULA", @@ -56,6 +62,16 @@ "WAD Name": "EULA-NUS", "Danger": "\"EULA\" is a hidden channel used to display the End User License Agreement that must be accepted to connect to WiiConnect24. Online services may not work correctly if this channel is damaged or not present." }, + { + "Name": "MIOS", + "TID": "0000000100000101", + "Versions": { + "World": [4, 5, 8, 9, 10] + }, + "Ticket": true, + "WAD Name": "MIOS-NUS", + "Danger": "MIOS is required for the Wii's backwards compatibility with the GameCube. GameCube games will not run properly if MIOS is damaged or not present." + }, { "Name": "Region Select", "TID": "0001000848414CXX", @@ -68,6 +84,19 @@ "Ticket": true, "WAD Name": "Region-Select-NUS", "Danger": "\"Region Select\" is a hidden channel used during the Wii's initial setup. It is unlikely to cause functional problems after setup is complete, but you will not be able to set up your console again if it is factory reset if this channel is damaged or not present, and it will need to be reinstalled." + }, + { + "Name": "System Menu", + "TID": "0000000100000002", + "Versions": { + "USA": [97, 193, 225, 257, 289, 353, 385, 417, 449, 481, 513], + "EUR": [130, 162, 194, 226, 258, 290, 354, 386, 418, 450, 482, 514], + "JAP": [128, 192, 224, 256, 288, 352, 384, 416, 448, 480, 512], + "KOR": [390, 454, 486, 518] + }, + "Ticket": true, + "WAD Name": "RVL-WiiSystemmenu", + "Danger": "The System Menu is a critical part of the Wii's operation, and should not be modified without proper brick prevention in place. You should have BootMii installed as boot2 if possible, and if not, Priiloader installed before making changes to the System Menu." } ], "IOS": [