mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| adc9f6f6d4 |
@@ -383,16 +383,17 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
|
|
||||||
if state.image_path is not None and os.path.exists(state.image_path):
|
if state.image_path is not None and os.path.exists(state.image_path):
|
||||||
self.image = QImage(state.image_path)
|
self.image = QImage(state.image_path)
|
||||||
|
self.image = self.image.scaledToWidth(300, Qt.SmoothTransformation)
|
||||||
self.pixmap = QPixmap.fromImage(self.image)
|
self.pixmap = QPixmap.fromImage(self.image)
|
||||||
self.overlay_label = QLabel(self)
|
self.overlay_label = QLabel(self)
|
||||||
self.overlay_label.setPixmap(self.pixmap)
|
self.overlay_label.setPixmap(self.pixmap)
|
||||||
self.overlay_label.adjustSize()
|
self.overlay_label.adjustSize()
|
||||||
self.overlay_label.raise_()
|
self.overlay_label.raise_()
|
||||||
|
|
||||||
offset_x = -1350
|
# offset_x = -1350
|
||||||
offset_y = -550
|
# offset_y = -550
|
||||||
x = self.width() - self.overlay_label.width() - offset_x
|
x = self.width() - self.overlay_label.width() # - offset_x
|
||||||
y = self.height() - self.overlay_label.height() - offset_y
|
y = self.height() - self.overlay_label.height() # - offset_y
|
||||||
self.overlay_label.move(x, y)
|
self.overlay_label.move(x, y)
|
||||||
|
|
||||||
# temporarily disabled
|
# temporarily disabled
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import platform
|
|||||||
import signal
|
import signal
|
||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
@@ -41,16 +42,17 @@ def keyboardinterrupthandler(signum, frame):
|
|||||||
closehelper()
|
closehelper()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
start_time = time.perf_counter()
|
||||||
read_config()
|
read_config()
|
||||||
logs = get_download_logs()
|
logs = get_download_logs()
|
||||||
count, downloads = split_data(logs)
|
_, downloads = split_data(logs)
|
||||||
if args.debug:
|
if args.debug:
|
||||||
state.debug = args.debug # override of read_config
|
state.debug = args.debug # override of read_config
|
||||||
signal.signal(signal.SIGINT, keyboardinterrupthandler)
|
signal.signal(signal.SIGINT, keyboardinterrupthandler)
|
||||||
consoleLog("Starting SoftwareManager...")
|
consoleLog("Starting SoftwareManager...")
|
||||||
consoleLog("Fetching Network Interfaces...")
|
consoleLog("Fetching Network Interfaces...")
|
||||||
list_interfaces()
|
list_interfaces()
|
||||||
consoleLog("Initialiting Interface variables...")
|
consoleLog("Initializing Interface variables...")
|
||||||
init_interfaces()
|
init_interfaces()
|
||||||
consoleLog(f"Current Bound: {state.bound_interface}")
|
consoleLog(f"Current Bound: {state.bound_interface}")
|
||||||
run_thread(threading.Thread(target=send_notification, args=(shutdown_event,), daemon=True))
|
run_thread(threading.Thread(target=send_notification, args=(shutdown_event,), daemon=True))
|
||||||
@@ -59,6 +61,7 @@ if __name__ == "__main__":
|
|||||||
consoleLog("Started Thread: update_log")
|
consoleLog("Started Thread: update_log")
|
||||||
run_thread(threading.Thread(target=check_completed, args=(downloads, state.autoresume)))
|
run_thread(threading.Thread(target=check_completed, args=(downloads, state.autoresume)))
|
||||||
consoleLog("Started Thread: check_completed")
|
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()
|
run_gui()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user