diff --git a/src/data/hosts/megadb.py b/src/data/hosts/megadb.py index 7e8c413..c1b08ac 100644 --- a/src/data/hosts/megadb.py +++ b/src/data/hosts/megadb.py @@ -13,7 +13,10 @@ class UIBridge(QObject): ui_bridge = UIBridge() def show_megadb_notification(): - notification_popup = NotificationPopup("Opened MegaDB link in browser", "Beware of malicious Ads. Make sure to have an adblocker installed.\n" '
Visit uBlock Origin') + notification_popup = NotificationPopup(title="Opened MegaDB link in browser", + text="Beware of malicious Ads. Make sure to have an adblocker installed.\n" '
Visit uBlock Origin', + darkmode=False if state.window_transparency else True + ) notification_popup.setTextFormat(Qt.TextFormat.RichText) notification_popup.setTextInteractionFlags(Qt.TextInteractionFlag.TextBrowserInteraction) notification_popup.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground) diff --git a/src/interface/dialogs/notificationpopup.py b/src/interface/dialogs/notificationpopup.py index baf9f67..4b18d8d 100644 --- a/src/interface/dialogs/notificationpopup.py +++ b/src/interface/dialogs/notificationpopup.py @@ -1,9 +1,13 @@ from PySide6.QtWidgets import QMessageBox +import qdarktheme class NotificationPopup(QMessageBox): - def __init__(self, title, text, infotext=None, parent=None): + def __init__(self, title, text, infotext=None, parent=None, darkmode=True): super().__init__(parent) + if darkmode is True: + qdarktheme.setup_theme("auto") + self.setIcon(QMessageBox.Icon.Information) self.setWindowTitle(title) self.setText(text)