Skip to content

Commit

Permalink
Merge pull request getavalon#9 from Colorbleed/hotfix
Browse files Browse the repository at this point in the history
Hotfix for icons
  • Loading branch information
aardschok authored Jul 6, 2018
2 parents 1ab175b + b95bb22 commit 9577807
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions launcher/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

# Dependencies
from avalon import io
import avalon.vendor.qtawesome as qta
from PyQt5 import QtCore, QtGui, QtQml, QtWidgets, QtQuick

# Local libraries
Expand All @@ -16,6 +15,9 @@
APP_PATH = lib.resource("qml", "main.qml")
ICON_PATH = lib.resource("icon", "main.png")

# TODO: Re-implement icons of tray menu after resolving #323
# Issue 323: https://github.com/getavalon/core/issues/323


class Application(QtWidgets.QApplication):

Expand Down Expand Up @@ -75,15 +77,13 @@ def init_tray(self):

# Build the right-mouse context menu for the tray icon
menu = QtWidgets.QMenu()
icon_color = "#509eff" # launcher icon color

def window_show():
self.window.show()
self.window.raise_()
self.window.requestActivate()

icon = qta.icon("fa.eye", color=icon_color)
show = QtWidgets.QAction(icon, "Show", self)
show = QtWidgets.QAction("Show", self)
show.triggered.connect(window_show)
menu.addAction(show)

Expand All @@ -96,8 +96,7 @@ def on_quit():

self.quit()

icon = qta.icon("fa.close", color=icon_color)
quit = QtWidgets.QAction(icon, "Quit", self)
quit = QtWidgets.QAction("Quit", self)
quit.triggered.connect(on_quit)
menu.addAction(quit)
tray.setContextMenu(menu)
Expand Down

0 comments on commit 9577807

Please sign in to comment.