diff --git a/CHANGELOG.md b/CHANGELOG.md index 18ec4d88..8e5dcf73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - AUR: - Optional dependencies are not checked by default in their installation popup. - History panel can now me maximized, minimized and allows to copy column content. +- It is possible to use custom tray icons via the environment variables: **BAUH_TRAY_DEFAULT_ICON_PATH** and ** **BAUH_TRAY_UPDATES_ICON_PATH** ( displayed when there are updates ) - Minor UI improvements ### Fixes diff --git a/README.md b/README.md index c483862e..a2479299 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,8 @@ You can change some application settings via environment variables or arguments - **BAUH_MAX_DISPLAYED**: Maximum number of displayed packages in the management panel table. Default: 50. - **BAUH_LOGS**: enable **bauh** logs (for debugging purposes). Use: **0** (disable, default) or **1** (enable) - **BAUH_DOWNLOAD_MULTITHREAD**: enable multi-threaded download for installation files ( only possible if **aria2** is installed ). This feature reduces applications installation time ( only supported by AUR packages at the moment ). Use **0** (disable) or **1** (enabled, default). +- **BAUH_TRAY_DEFAULT_ICON_PATH**: define a custom icon for the tray mode ( absolute path) +- **BAUH_TRAY_UPDATES_ICON_PATH** define a custom updates icon for the tray mode ( absolute path) ### How to improve **bauh** performance - Disable package types that you do not want to deal with ( via GUI ) diff --git a/bauh/view/qt/root.py b/bauh/view/qt/root.py index 1948590e..efc76a60 100644 --- a/bauh/view/qt/root.py +++ b/bauh/view/qt/root.py @@ -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'))) diff --git a/bauh/view/qt/systray.py b/bauh/view/qt/systray.py index f2d90bc7..cb168f8f 100755 --- a/bauh/view/qt/systray.py +++ b/bauh/view/qt/systray.py @@ -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()