Skip to content

Commit

Permalink
Implement feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
m3nu committed Apr 16, 2023
1 parent 1df611c commit c1197bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ commands=flake8 src tests
max_line_length = 120

[pylint.master]
extension-pkg-whitelist=PyQt5
extension-pkg-whitelist=PyQt6
load-plugins=

[pylint.messages control]
Expand Down
10 changes: 1 addition & 9 deletions src/vorta/tray_menu.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from PyQt6.QtGui import QColor, QIcon, QScreen
from PyQt6.QtGui import QIcon
from PyQt6.QtWidgets import QApplication, QMenu, QSystemTrayIcon
from vorta.store.models import BackupProfileModel
from vorta.utils import get_asset
Expand Down Expand Up @@ -73,14 +73,6 @@ def build_menu(self):
exit_action = menu.addAction(self.tr('Quit'))
exit_action.triggered.connect(self.app.quit)

def is_taskbar_dark(self):
app = QApplication.instance()
long_color = QScreen.grabWindow(app.primaryScreen()).toImage().pixel(0, 0)
int_color = int(long_color)
return 150 > QColor.lightness(
QColor.fromRgb(((int_color >> 16) & 0xFF), ((int_color >> 8) & 0xFF), (int_color & 0xFF))
)

def set_tray_icon(self, active=False):
"""
Use white tray icon, when on Gnome or in dark mode. Otherwise use dark icon.
Expand Down

0 comments on commit c1197bc

Please sign in to comment.