Skip to content

Commit

Permalink
Re-set min section size for manuscript daily progress calendar to fit…
Browse files Browse the repository at this point in the history
… the sidebar on windows, closes #1449
  • Loading branch information
zkovari committed Oct 17, 2024
1 parent a1b6390 commit d0a0f38
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/python/plotlyst/view/widget/manuscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -1216,13 +1216,15 @@ def __init__(self, novel: Novel, parent=None):
self._initButton(item.widget().layout().itemAt(0), 'ei.circle-arrow-left')
self._initButton(item.widget().layout().itemAt(6), 'ei.circle-arrow-right')

item = self.layout().itemAt(1)
if isinstance(item.widget(), QTableView):
item.widget().setStyleSheet(f'''
widget = self.layout().itemAt(1).widget()
if isinstance(widget, QTableView):
widget.setStyleSheet(f'''
QTableView {{
selection-background-color: {RELAXED_WHITE_COLOR};
}}
''')
widget.horizontalHeader().setMinimumSectionSize(20)
widget.verticalHeader().setMinimumSectionSize(20)

today = QDate.currentDate()
self.setMaximumDate(today)
Expand All @@ -1232,6 +1234,7 @@ def showEvent(self, event: QShowEvent) -> None:
if QDate.currentDate() != self.maximumDate():
self.setMaximumDate(QDate.currentDate())
self.showToday()
super().showEvent(event)

@overrides
def showToday(self) -> None:
Expand Down

0 comments on commit d0a0f38

Please sign in to comment.