Fix window resize behavior - content now scales properly
- Replace setMaximumHeight() with setMinimumHeight() for all tables and summaries - Tables now expand/contract when window is resized instead of staying fixed - Summary text boxes scale with window height changes - Graph canvases set minimum height but can grow with window - Proper responsive layout that adapts to different window sizes - Better user experience with flexible content sizing
This commit is contained in:
+8
-6
@@ -448,7 +448,7 @@ class MainWindow(QMainWindow):
|
|||||||
uploadSummaryLayout = QVBoxLayout()
|
uploadSummaryLayout = QVBoxLayout()
|
||||||
self.uploadSummary = QTextEdit()
|
self.uploadSummary = QTextEdit()
|
||||||
self.uploadSummary.setReadOnly(True)
|
self.uploadSummary.setReadOnly(True)
|
||||||
self.uploadSummary.setMaximumHeight(90)
|
self.uploadSummary.setMinimumHeight(60)
|
||||||
uploadSummaryLayout.addWidget(self.uploadSummary)
|
uploadSummaryLayout.addWidget(self.uploadSummary)
|
||||||
uploadSummaryGroup.setLayout(uploadSummaryLayout)
|
uploadSummaryGroup.setLayout(uploadSummaryLayout)
|
||||||
summarySection.addWidget(uploadSummaryGroup)
|
summarySection.addWidget(uploadSummaryGroup)
|
||||||
@@ -458,7 +458,7 @@ class MainWindow(QMainWindow):
|
|||||||
downloadSummaryLayout = QVBoxLayout()
|
downloadSummaryLayout = QVBoxLayout()
|
||||||
self.downloadSummary = QTextEdit()
|
self.downloadSummary = QTextEdit()
|
||||||
self.downloadSummary.setReadOnly(True)
|
self.downloadSummary.setReadOnly(True)
|
||||||
self.downloadSummary.setMaximumHeight(90)
|
self.downloadSummary.setMinimumHeight(60)
|
||||||
downloadSummaryLayout.addWidget(self.downloadSummary)
|
downloadSummaryLayout.addWidget(self.downloadSummary)
|
||||||
downloadSummaryGroup.setLayout(downloadSummaryLayout)
|
downloadSummaryGroup.setLayout(downloadSummaryLayout)
|
||||||
summarySection.addWidget(downloadSummaryGroup)
|
summarySection.addWidget(downloadSummaryGroup)
|
||||||
@@ -474,7 +474,7 @@ class MainWindow(QMainWindow):
|
|||||||
self.uploadUsersTable = QTableWidget(0, 3)
|
self.uploadUsersTable = QTableWidget(0, 3)
|
||||||
self.uploadUsersTable.setHorizontalHeaderLabels(["User", "Files", "Data"])
|
self.uploadUsersTable.setHorizontalHeaderLabels(["User", "Files", "Data"])
|
||||||
self.uploadUsersTable.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
self.uploadUsersTable.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
||||||
self.uploadUsersTable.setMaximumHeight(150)
|
self.uploadUsersTable.setMinimumHeight(100)
|
||||||
self.uploadUsersTable.setAlternatingRowColors(True)
|
self.uploadUsersTable.setAlternatingRowColors(True)
|
||||||
uploadUsersLayout.addWidget(self.uploadUsersTable)
|
uploadUsersLayout.addWidget(self.uploadUsersTable)
|
||||||
uploadUsersGroup.setLayout(uploadUsersLayout)
|
uploadUsersGroup.setLayout(uploadUsersLayout)
|
||||||
@@ -486,7 +486,7 @@ class MainWindow(QMainWindow):
|
|||||||
self.downloadUsersTable = QTableWidget(0, 3)
|
self.downloadUsersTable = QTableWidget(0, 3)
|
||||||
self.downloadUsersTable.setHorizontalHeaderLabels(["User", "Files", "Data"])
|
self.downloadUsersTable.setHorizontalHeaderLabels(["User", "Files", "Data"])
|
||||||
self.downloadUsersTable.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
self.downloadUsersTable.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
||||||
self.downloadUsersTable.setMaximumHeight(150)
|
self.downloadUsersTable.setMinimumHeight(100)
|
||||||
self.downloadUsersTable.setAlternatingRowColors(True)
|
self.downloadUsersTable.setAlternatingRowColors(True)
|
||||||
downloadUsersLayout.addWidget(self.downloadUsersTable)
|
downloadUsersLayout.addWidget(self.downloadUsersTable)
|
||||||
downloadUsersGroup.setLayout(downloadUsersLayout)
|
downloadUsersGroup.setLayout(downloadUsersLayout)
|
||||||
@@ -503,7 +503,7 @@ class MainWindow(QMainWindow):
|
|||||||
self.uploadTypesTable = QTableWidget(0, 3)
|
self.uploadTypesTable = QTableWidget(0, 3)
|
||||||
self.uploadTypesTable.setHorizontalHeaderLabels(["Extension", "Files", "Data"])
|
self.uploadTypesTable.setHorizontalHeaderLabels(["Extension", "Files", "Data"])
|
||||||
self.uploadTypesTable.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
self.uploadTypesTable.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
||||||
self.uploadTypesTable.setMaximumHeight(150)
|
self.uploadTypesTable.setMinimumHeight(100)
|
||||||
self.uploadTypesTable.setAlternatingRowColors(True)
|
self.uploadTypesTable.setAlternatingRowColors(True)
|
||||||
uploadTypesLayout.addWidget(self.uploadTypesTable)
|
uploadTypesLayout.addWidget(self.uploadTypesTable)
|
||||||
uploadTypesGroup.setLayout(uploadTypesLayout)
|
uploadTypesGroup.setLayout(uploadTypesLayout)
|
||||||
@@ -515,7 +515,7 @@ class MainWindow(QMainWindow):
|
|||||||
self.downloadTypesTable = QTableWidget(0, 3)
|
self.downloadTypesTable = QTableWidget(0, 3)
|
||||||
self.downloadTypesTable.setHorizontalHeaderLabels(["Extension", "Files", "Data"])
|
self.downloadTypesTable.setHorizontalHeaderLabels(["Extension", "Files", "Data"])
|
||||||
self.downloadTypesTable.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
self.downloadTypesTable.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
||||||
self.downloadTypesTable.setMaximumHeight(150)
|
self.downloadTypesTable.setMinimumHeight(100)
|
||||||
self.downloadTypesTable.setAlternatingRowColors(True)
|
self.downloadTypesTable.setAlternatingRowColors(True)
|
||||||
downloadTypesLayout.addWidget(self.downloadTypesTable)
|
downloadTypesLayout.addWidget(self.downloadTypesTable)
|
||||||
downloadTypesGroup.setLayout(downloadTypesLayout)
|
downloadTypesGroup.setLayout(downloadTypesLayout)
|
||||||
@@ -563,6 +563,7 @@ class MainWindow(QMainWindow):
|
|||||||
self.amountsFigure = Figure(figsize=(10, 3))
|
self.amountsFigure = Figure(figsize=(10, 3))
|
||||||
self.amountsFigure.subplots_adjust(left=0.08, right=0.95, top=0.9, bottom=0.15)
|
self.amountsFigure.subplots_adjust(left=0.08, right=0.95, top=0.9, bottom=0.15)
|
||||||
self.amountsCanvas = FigureCanvas(self.amountsFigure)
|
self.amountsCanvas = FigureCanvas(self.amountsFigure)
|
||||||
|
self.amountsCanvas.setMinimumHeight(200)
|
||||||
|
|
||||||
amountsLayout.addLayout(amountsCheckboxLayout)
|
amountsLayout.addLayout(amountsCheckboxLayout)
|
||||||
amountsLayout.addWidget(self.amountsCanvas)
|
amountsLayout.addWidget(self.amountsCanvas)
|
||||||
@@ -590,6 +591,7 @@ class MainWindow(QMainWindow):
|
|||||||
self.ratiosFigure = Figure(figsize=(10, 3))
|
self.ratiosFigure = Figure(figsize=(10, 3))
|
||||||
self.ratiosFigure.subplots_adjust(left=0.08, right=0.92, top=0.9, bottom=0.15)
|
self.ratiosFigure.subplots_adjust(left=0.08, right=0.92, top=0.9, bottom=0.15)
|
||||||
self.ratiosCanvas = FigureCanvas(self.ratiosFigure)
|
self.ratiosCanvas = FigureCanvas(self.ratiosFigure)
|
||||||
|
self.ratiosCanvas.setMinimumHeight(200)
|
||||||
|
|
||||||
ratiosLayout.addLayout(ratiosCheckboxLayout)
|
ratiosLayout.addLayout(ratiosCheckboxLayout)
|
||||||
ratiosLayout.addWidget(self.ratiosCanvas)
|
ratiosLayout.addWidget(self.ratiosCanvas)
|
||||||
|
|||||||
Reference in New Issue
Block a user