diff --git a/comictaggerlib/ui/volumeselectionwindow.ui b/comictaggerlib/ui/volumeselectionwindow.ui index 32a9be3..4812423 100644 --- a/comictaggerlib/ui/volumeselectionwindow.ui +++ b/comictaggerlib/ui/volumeselectionwindow.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>893</width> - <height>476</height> + <width>950</width> + <height>480</height> </rect> </property> <property name="windowTitle"> diff --git a/comictaggerlib/volumeselectionwindow.py b/comictaggerlib/volumeselectionwindow.py index a7f2e60..92637bc 100644 --- a/comictaggerlib/volumeselectionwindow.py +++ b/comictaggerlib/volumeselectionwindow.py @@ -159,7 +159,9 @@ class VolumeSelectionWindow(QtWidgets.QDialog): # Load to retrieve settings self.talker_api = talker_api - self.twList.resizeColumnsToContents() + # Set the minimum row height to the default. + # this way rows will be more consistent when resizeRowsToContents is called + self.twList.verticalHeader().setMinimumSectionSize(self.twList.verticalHeader().defaultSectionSize()) self.twList.currentItemChanged.connect(self.current_item_changed) self.twList.cellDoubleClicked.connect(self.cell_double_clicked) self.btnRequery.clicked.connect(self.requery) @@ -474,6 +476,16 @@ class VolumeSelectionWindow(QtWidgets.QDialog): self.twList.setSortingEnabled(True) self.twList.selectRow(0) self.twList.resizeColumnsToContents() + # Get the width of the issues, year and publisher columns + owidth = self.twList.columnWidth(1) + self.twList.columnWidth(2) + self.twList.columnWidth(3) + # Get the remaining width after they fill the tableWidget + rwidth = self.twList.contentsRect().width() - owidth + + # Default the tableWidget to truncate series names + self.twList.setColumnWidth(0, rwidth) + + # Resize row height so the whole series can still be seen + self.twList.resizeRowsToContents() def showEvent(self, event: QtGui.QShowEvent) -> None: self.perform_query()