Code cleanup
This commit is contained in:
parent
34a13ea3b2
commit
2903c19667
3 changed files with 2 additions and 11 deletions
|
@ -111,11 +111,10 @@ class InstallDialog(QDialog):
|
||||||
if (self.ui.platform_combo.currentText() == "Mac" and pf.system() != "Darwin")
|
if (self.ui.platform_combo.currentText() == "Mac" and pf.system() != "Darwin")
|
||||||
else None
|
else None
|
||||||
)
|
)
|
||||||
|
|
||||||
if pf.system() == "Darwin" and "Mac" in platforms:
|
if pf.system() == "Darwin" and "Mac" in platforms:
|
||||||
self.ui.platform_combo.setCurrentIndex(platforms.index("Mac"))
|
self.ui.platform_combo.setCurrentIndex(platforms.index("Mac"))
|
||||||
|
|
||||||
self.ui.platform_combo.currentTextChanged.connect(self.setup_sdl_list)
|
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.setValue(self.core.lgd.config.getint("Legendary", "max_workers", fallback=0))
|
||||||
self.advanced.ui.max_workers_spin.valueChanged.connect(self.option_changed)
|
self.advanced.ui.max_workers_spin.valueChanged.connect(self.option_changed)
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,6 @@ class DownloadWidget(ImageWidget):
|
||||||
super(DownloadWidget, self).__init__(parent=parent)
|
super(DownloadWidget, self).__init__(parent=parent)
|
||||||
self.ui = Ui_DownloadWidget()
|
self.ui = Ui_DownloadWidget()
|
||||||
self.ui.setupUi(self)
|
self.ui.setupUi(self)
|
||||||
self.ui.progress_bar.setStyleSheet(
|
|
||||||
"""
|
|
||||||
QProgressBar {
|
|
||||||
background-color : rgba(0, 0, 0, 0.25);
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Painting overrides
|
Painting overrides
|
||||||
|
@ -68,7 +61,7 @@ class DownloadWidget(ImageWidget):
|
||||||
|
|
||||||
def paint_image_cover(self, painter: QPainter, a0: QPaintEvent) -> None:
|
def paint_image_cover(self, painter: QPainter, a0: QPaintEvent) -> None:
|
||||||
painter.setOpacity(self._opacity)
|
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)
|
painter.fillRect(self.rect(), color)
|
||||||
brush = QBrush(self._pixmap)
|
brush = QBrush(self._pixmap)
|
||||||
brush.setTransform(self._transform)
|
brush.setTransform(self._transform)
|
||||||
|
|
|
@ -54,7 +54,6 @@ class LegendaryCore(LegendaryCoreReal):
|
||||||
disable_https=disable_https
|
disable_https=disable_https
|
||||||
)
|
)
|
||||||
# lk: monkeypatch run_real (the method that emits the stats) into DLManager
|
# lk: monkeypatch run_real (the method that emits the stats) into DLManager
|
||||||
|
|
||||||
# pylint: disable=E1111
|
# pylint: disable=E1111
|
||||||
dlm.run_real = DLManager.run_real.__get__(dlm, DLManager)
|
dlm.run_real = DLManager.run_real.__get__(dlm, DLManager)
|
||||||
# lk: set the queue for reporting statistics back the UI
|
# lk: set the queue for reporting statistics back the UI
|
||||||
|
|
Loading…
Reference in a new issue