Fixes bug in forecast thread (close app while downloading). Also makes some style adjustments

This commit is contained in:
alessandro90
2019-05-01 19:50:03 +02:00
parent 9c77ac8278
commit 3826681685
13 changed files with 670 additions and 438 deletions

View File

@@ -1,6 +1,7 @@
from PyQt5.QtWidgets import QLabel
from PyQt5.QtCore import Qt
class FixedAspectRatioLabel(QLabel):
def __init__(self, parent = None):
super().__init__(parent)
@@ -20,7 +21,9 @@ class FixedAspectRatioLabel(QLabel):
if self.pixmap:
self.setPixmap(
self.pixmap.scaled(
self.size(), Qt.IgnoreAspectRatio, Qt.SmoothTransformation))
self.size(), Qt.IgnoreAspectRatio, Qt.SmoothTransformation
)
)
def rescale(self, size):
self.resize(size)