1
0
Fork 0
mirror of synced 2024-06-23 08:40:45 +12:00

Code cleanup

This commit is contained in:
loathingKernel 2023-02-07 13:06:08 +02:00
parent 34a13ea3b2
commit 2903c19667
3 changed files with 2 additions and 11 deletions

View file

@ -111,11 +111,10 @@ class InstallDialog(QDialog):
if (self.ui.platform_combo.currentText() == "Mac" and pf.system() != "Darwin")
else None
)
if pf.system() == "Darwin" and "Mac" in platforms:
self.ui.platform_combo.setCurrentIndex(platforms.index("Mac"))
self.ui.platform_combo.currentTextChanged.connect(self.setup_sdl_list)
self.advanced.ui.max_workers_spin.setValue(self.core.lgd.config.getint("Legendary", "max_workers", fallback=0))
self.advanced.ui.max_workers_spin.valueChanged.connect(self.option_changed)

View file

@ -18,13 +18,6 @@ class DownloadWidget(ImageWidget):
super(DownloadWidget, self).__init__(parent=parent)
self.ui = Ui_DownloadWidget()
self.ui.setupUi(self)
self.ui.progress_bar.setStyleSheet(
"""
QProgressBar {
background-color : rgba(0, 0, 0, 0.25);
}
"""
)
"""
Painting overrides
@ -68,7 +61,7 @@ class DownloadWidget(ImageWidget):
def paint_image_cover(self, painter: QPainter, a0: QPaintEvent) -> None:
painter.setOpacity(self._opacity)
color = self.palette().color(QPalette.Background) # .darker(75)
color = self.palette().color(QPalette.Background).darker(75)
painter.fillRect(self.rect(), color)
brush = QBrush(self._pixmap)
brush.setTransform(self._transform)

View file

@ -54,7 +54,6 @@ class LegendaryCore(LegendaryCoreReal):
disable_https=disable_https
)
# lk: monkeypatch run_real (the method that emits the stats) into DLManager
# pylint: disable=E1111
dlm.run_real = DLManager.run_real.__get__(dlm, DLManager)
# lk: set the queue for reporting statistics back the UI