From adc9f6f6d41755974aa36dd0069e243563c9f187 Mon Sep 17 00:00:00 2001 From: Vxrtrauter <101264710+Vxrtrauter@users.noreply.github.com> Date: Sun, 8 Feb 2026 23:54:10 +0100 Subject: [PATCH] QOL: tested stuff, fixed main.py typos, removed unused variables and added startup timer because it looks cool --- core/interface/gui.py | 9 +++++---- main.py | 9 ++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/core/interface/gui.py b/core/interface/gui.py index ee9aec5..6325cc2 100644 --- a/core/interface/gui.py +++ b/core/interface/gui.py @@ -383,16 +383,17 @@ class MainWindow(QtWidgets.QMainWindow, QWidget): if state.image_path is not None and os.path.exists(state.image_path): self.image = QImage(state.image_path) + self.image = self.image.scaledToWidth(300, Qt.SmoothTransformation) self.pixmap = QPixmap.fromImage(self.image) self.overlay_label = QLabel(self) self.overlay_label.setPixmap(self.pixmap) self.overlay_label.adjustSize() self.overlay_label.raise_() - offset_x = -1350 - offset_y = -550 - x = self.width() - self.overlay_label.width() - offset_x - y = self.height() - self.overlay_label.height() - offset_y + # offset_x = -1350 + # offset_y = -550 + x = self.width() - self.overlay_label.width() # - offset_x + y = self.height() - self.overlay_label.height() # - offset_y self.overlay_label.move(x, y) # temporarily disabled diff --git a/main.py b/main.py index dfee675..f0f6e48 100644 --- a/main.py +++ b/main.py @@ -17,6 +17,7 @@ import platform import signal import argparse import sys +import time parser = argparse.ArgumentParser() @@ -41,16 +42,17 @@ def keyboardinterrupthandler(signum, frame): closehelper() if __name__ == "__main__": + start_time = time.perf_counter() read_config() logs = get_download_logs() - count, downloads = split_data(logs) + _, downloads = split_data(logs) if args.debug: state.debug = args.debug # override of read_config signal.signal(signal.SIGINT, keyboardinterrupthandler) consoleLog("Starting SoftwareManager...") consoleLog("Fetching Network Interfaces...") list_interfaces() - consoleLog("Initialiting Interface variables...") + consoleLog("Initializing Interface variables...") init_interfaces() consoleLog(f"Current Bound: {state.bound_interface}") run_thread(threading.Thread(target=send_notification, args=(shutdown_event,), daemon=True)) @@ -59,6 +61,7 @@ if __name__ == "__main__": consoleLog("Started Thread: update_log") run_thread(threading.Thread(target=check_completed, args=(downloads, state.autoresume))) consoleLog("Started Thread: check_completed") - consoleLog("Launching GUI") + elapsed = time.perf_counter() - start_time + consoleLog(f"Initialization completed in {elapsed:.2f}s. Launching GUI") run_gui()