From 2903c1966729c626bdc17a7a0e1e01e835febe1a Mon Sep 17 00:00:00 2001 From: loathingKernel <142770+loathingKernel@users.noreply.github.com> Date: Tue, 7 Feb 2023 13:06:08 +0200 Subject: [PATCH] Code cleanup --- rare/components/dialogs/install_dialog.py | 3 +-- rare/components/tabs/downloads/download.py | 9 +-------- rare/lgndr/core.py | 1 - 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/rare/components/dialogs/install_dialog.py b/rare/components/dialogs/install_dialog.py index 11930264..aa402e28 100644 --- a/rare/components/dialogs/install_dialog.py +++ b/rare/components/dialogs/install_dialog.py @@ -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) diff --git a/rare/components/tabs/downloads/download.py b/rare/components/tabs/downloads/download.py index 6e0ab97b..cceabc2e 100644 --- a/rare/components/tabs/downloads/download.py +++ b/rare/components/tabs/downloads/download.py @@ -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) diff --git a/rare/lgndr/core.py b/rare/lgndr/core.py index 52fb26dc..beaf5598 100644 --- a/rare/lgndr/core.py +++ b/rare/lgndr/core.py @@ -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