Fix details in fixed aspect ratio labels.

This commit is contained in:
alessandro90
2019-05-05 11:45:53 +02:00
parent 175cb66c76
commit 36f941131c
6 changed files with 306 additions and 263 deletions

View File

@@ -12,10 +12,10 @@ class FixedAspectRatioWidget(QWidget):
h, w = self.height(), self.width()
h_lbl = h / 9 - self.space
w_lbl = 5 * h_lbl
if w_lbl > w:
w_lbl = w
h_lbl = h / 9 - self.space
w_pad = w - 10
if w_lbl > w_pad:
w_lbl = w_pad
h_lbl = w_pad / 5
for label in self.labels:
label.rescale(QSize(w_lbl, h_lbl))