diff --git a/QT/main_window.ui b/QT/main_window.ui
index 884f2cf..38d9204 100644
--- a/QT/main_window.ui
+++ b/QT/main_window.ui
@@ -29,11 +29,11 @@
-
-
+
-
+
false
diff --git a/QT/ui_main_window.py b/QT/ui_main_window.py
index ac400f7..d1687e7 100644
--- a/QT/ui_main_window.py
+++ b/QT/ui_main_window.py
@@ -39,18 +39,18 @@ class Ui_MainWindow(object):
self.verticalLayout.addWidget(self.lineEdit)
- self.media_tracks_list_widget = QListWidget(self.layoutWidget)
- self.media_tracks_list_widget.setObjectName(u"media_tracks_list_widget")
+ self.tracks_list_widget = QListWidget(self.layoutWidget)
+ self.tracks_list_widget.setObjectName(u"tracks_list_widget")
- self.verticalLayout.addWidget(self.media_tracks_list_widget)
+ self.verticalLayout.addWidget(self.tracks_list_widget)
self.splitter.addWidget(self.layoutWidget)
- self.media_detail_plain_text_edit = QPlainTextEdit(self.splitter)
- self.media_detail_plain_text_edit.setObjectName(u"media_detail_plain_text_edit")
- self.media_detail_plain_text_edit.setUndoRedoEnabled(False)
- self.media_detail_plain_text_edit.setLineWrapMode(QPlainTextEdit.NoWrap)
- self.media_detail_plain_text_edit.setReadOnly(True)
- self.splitter.addWidget(self.media_detail_plain_text_edit)
+ self.detail_plain_text_edit = QPlainTextEdit(self.splitter)
+ self.detail_plain_text_edit.setObjectName(u"detail_plain_text_edit")
+ self.detail_plain_text_edit.setUndoRedoEnabled(False)
+ self.detail_plain_text_edit.setLineWrapMode(QPlainTextEdit.NoWrap)
+ self.detail_plain_text_edit.setReadOnly(True)
+ self.splitter.addWidget(self.detail_plain_text_edit)
self.verticalLayout_2.addWidget(self.splitter)
@@ -63,6 +63,6 @@ class Ui_MainWindow(object):
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Form", None))
self.lineEdit.setText(QCoreApplication.translate("MainWindow", u"Search", None))
- self.media_detail_plain_text_edit.setPlainText("")
+ self.detail_plain_text_edit.setPlainText("")
# retranslateUi
diff --git a/main_window.py b/main_window.py
index 2d1b138..a6b95c2 100644
--- a/main_window.py
+++ b/main_window.py
@@ -2,6 +2,7 @@ from PySide6.QtWidgets import QWidget
from ui_main_window import Ui_MainWindow
from file_cmds import FileCmds
from PySide6.QtGui import QFont
+from PySide6.QtCore import QSize
class MainWindow(QWidget, Ui_MainWindow):
@@ -13,13 +14,13 @@ class MainWindow(QWidget, Ui_MainWindow):
self.setAcceptDrops(True)
self.setupConnections()
- #TEMP to remove
- #Set font to Mononoki system wise
- self.media_detail_plain_text_edit.setFont(QFont("Mononoki Nerd Font", 10))
+ font = "UbuntuMono NF"
+ self.tracks_list_widget.setFont(QFont(font, 12))
+ self.detail_plain_text_edit.setFont(QFont(font, 12))
def setupConnections(self):
- self.media_tracks_list_widget.itemClicked.connect(self.popuplate_content)
+ self.tracks_list_widget.itemSelectionChanged.connect(self.popuplate_content)
def dragEnterEvent(self, event):
@@ -39,16 +40,21 @@ class MainWindow(QWidget, Ui_MainWindow):
self.setWindowTitle(f"{self.filePath} - {self.windowTitle}")
self.populate_tabs()
- item = self.media_tracks_list_widget.item(0).setSelected(True)
- self.popuplate_content()
-
+ self.tracks_list_widget.item(0).setSelected(True)
+
def populate_tabs(self):
- self.media_tracks_list_widget.clear()
- self.media_tracks_list_widget.addItems(self.fileCmds.tabsList)
+ self.tracks_list_widget.clear()
+ self.tracks_list_widget.addItems(self.fileCmds.tabsList)
+
+ for i in range(self.tracks_list_widget.count()):
+ item = self.tracks_list_widget.item(i)
+ height = self.tracks_list_widget.sizeHintForRow(0)
+ item.setSizeHint(QSize(0, height+5))
def popuplate_content(self):
- itemSelected = self.media_tracks_list_widget.selectedItems()[0].text()
- text = self.fileCmds.tabsContent[itemSelected]
- self.media_detail_plain_text_edit.setPlainText(text)
\ No newline at end of file
+ itemsSelected = self.tracks_list_widget.selectedItems()
+ if itemsSelected:
+ text = self.fileCmds.tabsContent[itemsSelected[0].text()]
+ self.detail_plain_text_edit.setPlainText(text)
\ No newline at end of file
diff --git a/ui_main_window.py b/ui_main_window.py
index ac400f7..d1687e7 100644
--- a/ui_main_window.py
+++ b/ui_main_window.py
@@ -39,18 +39,18 @@ class Ui_MainWindow(object):
self.verticalLayout.addWidget(self.lineEdit)
- self.media_tracks_list_widget = QListWidget(self.layoutWidget)
- self.media_tracks_list_widget.setObjectName(u"media_tracks_list_widget")
+ self.tracks_list_widget = QListWidget(self.layoutWidget)
+ self.tracks_list_widget.setObjectName(u"tracks_list_widget")
- self.verticalLayout.addWidget(self.media_tracks_list_widget)
+ self.verticalLayout.addWidget(self.tracks_list_widget)
self.splitter.addWidget(self.layoutWidget)
- self.media_detail_plain_text_edit = QPlainTextEdit(self.splitter)
- self.media_detail_plain_text_edit.setObjectName(u"media_detail_plain_text_edit")
- self.media_detail_plain_text_edit.setUndoRedoEnabled(False)
- self.media_detail_plain_text_edit.setLineWrapMode(QPlainTextEdit.NoWrap)
- self.media_detail_plain_text_edit.setReadOnly(True)
- self.splitter.addWidget(self.media_detail_plain_text_edit)
+ self.detail_plain_text_edit = QPlainTextEdit(self.splitter)
+ self.detail_plain_text_edit.setObjectName(u"detail_plain_text_edit")
+ self.detail_plain_text_edit.setUndoRedoEnabled(False)
+ self.detail_plain_text_edit.setLineWrapMode(QPlainTextEdit.NoWrap)
+ self.detail_plain_text_edit.setReadOnly(True)
+ self.splitter.addWidget(self.detail_plain_text_edit)
self.verticalLayout_2.addWidget(self.splitter)
@@ -63,6 +63,6 @@ class Ui_MainWindow(object):
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Form", None))
self.lineEdit.setText(QCoreApplication.translate("MainWindow", u"Search", None))
- self.media_detail_plain_text_edit.setPlainText("")
+ self.detail_plain_text_edit.setPlainText("")
# retranslateUi