mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 14:24:15 +02:00
custom tray icons
This commit is contained in:
@@ -16,6 +16,7 @@ def is_root():
|
||||
def ask_root_password(locale_keys: dict):
|
||||
|
||||
diag = QInputDialog()
|
||||
diag.setStyleSheet("""QLineEdit { border-radius: 5px; font-size: 16px }""")
|
||||
diag.setInputMode(QInputDialog.TextInput)
|
||||
diag.setTextEchoMode(QLineEdit.Password)
|
||||
diag.setWindowIcon(QIcon(resource.get_path('img/lock.svg')))
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
import time
|
||||
from io import StringIO
|
||||
from threading import Lock, Thread
|
||||
@@ -39,8 +40,8 @@ class TrayIcon(QSystemTrayIcon):
|
||||
self.i18n = i18n
|
||||
self.manager = manager
|
||||
|
||||
self.icon_default = QIcon(resource.get_path('img/logo.png'))
|
||||
self.icon_update = QIcon(resource.get_path('img/logo_update.png'))
|
||||
self.icon_default = QIcon(os.getenv('BAUH_TRAY_DEFAULT_ICON_PATH', resource.get_path('img/logo.png')))
|
||||
self.icon_update = QIcon(os.getenv('BAUH_TRAY_UPDATES_ICON_PATH', resource.get_path('img/logo_update.png')))
|
||||
self.setIcon(self.icon_default)
|
||||
|
||||
self.menu = QMenu()
|
||||
|
||||
Reference in New Issue
Block a user