Commit a6339c83 authored by Tijmen de Mes's avatar Tijmen de Mes

Python 3.10 fix

parent fadf8b36
......@@ -50,9 +50,9 @@ class AboutPanel(base_class, ui_class, metaclass=QSingleton):
def _credits_size_changed(self, size):
self.credits_text.document().documentLayout().documentSizeChanged.disconnect(self._credits_size_changed)
self.setFixedSize(self.minimumSize().width(), self.minimumSize().width()*1.40) # set a fixed aspect ratio
self.setFixedSize(self.minimumSize().width(), int(self.minimumSize().width() * 1.40)) # set a fixed aspect ratio
row_height = self.credits_text.fontMetrics().height() + 2 # +2 for cellspacing
max_credits_height = 8*row_height + 2 + 14 # allow for maximum 8 rows; +2 for cellspacing and +14 for top/bottom margins
max_credits_height = 8 * row_height + 2 + 14 # allow for maximum 8 rows; +2 for cellspacing and +14 for top/bottom margins
if self.credits_text.height() > max_credits_height:
self.setFixedHeight(self.height() - (self.credits_text.height() - max_credits_height))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment