Skip to content

Commit

Permalink
Set the habihat icon for the entire QApplication
Browse files Browse the repository at this point in the history
This makes it so popup dialogs consistently use the same icon including error message boxes.
Remove the old per-window setting of habihat window icon.
  • Loading branch information
MHendricks committed Mar 26, 2024
1 parent 48c21c0 commit 7aa5255
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions hab_gui/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ def get_application(settings=None, splash=True, **kwargs):
_splash = SplashScreen(splash_image)
_splash.show()

# For a consistent UI, set the window icon for the application. All top
# level widgets will inherit this automatically unless they override
# it themselves.
app.setWindowIcon(utils.Paths.icon("habihat.svg"))

return app, _splash


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def __init__(self, resolver, verbosity=0, parent=None):
self.resolver = resolver
self.verbosity = verbosity
utils.load_ui(__file__, self)
self.setWindowIcon(utils.Paths.icon("habihat.svg"))

self.uiAddVariableBTN.setIcon(utils.Paths.icon("plus-thick.svg"))
self.uiEditCurrentItemBTN.setIcon(utils.Paths.icon("pencil-box-outline.svg"))
Expand Down
2 changes: 0 additions & 2 deletions hab_gui/windows/alias_launch_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ def process_entry_points(self):
)

def init_gui(self, uri=None):
self.setWindowIcon(utils.Paths.icon("habihat.svg"))

self.main_widget = QtWidgets.QWidget()
self.layout = QtWidgets.QGridLayout()

Expand Down

0 comments on commit 7aa5255

Please sign in to comment.