File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ commands=flake8 src tests
100100max_line_length = 120
101101
102102[pylint.master]
103- extension-pkg-whitelist =PyQt5
103+ extension-pkg-whitelist =PyQt6
104104load-plugins =
105105
106106[pylint.messages control]
Original file line number Diff line number Diff line change 11import os
2- from PyQt6 .QtGui import QColor , QIcon , QScreen
2+ from PyQt6 .QtGui import QIcon
33from PyQt6 .QtWidgets import QApplication , QMenu , QSystemTrayIcon
44from vorta .store .models import BackupProfileModel
55from vorta .utils import get_asset
@@ -73,14 +73,6 @@ def build_menu(self):
7373 exit_action = menu .addAction (self .tr ('Quit' ))
7474 exit_action .triggered .connect (self .app .quit )
7575
76- def is_taskbar_dark (self ):
77- app = QApplication .instance ()
78- long_color = QScreen .grabWindow (app .primaryScreen ()).toImage ().pixel (0 , 0 )
79- int_color = int (long_color )
80- return 150 > QColor .lightness (
81- QColor .fromRgb (((int_color >> 16 ) & 0xFF ), ((int_color >> 8 ) & 0xFF ), (int_color & 0xFF ))
82- )
83-
8476 def set_tray_icon (self , active = False ):
8577 """
8678 Use white tray icon, when on Gnome or in dark mode. Otherwise use dark icon.
You can’t perform that action at this time.
0 commit comments