Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Change toolbar btn background color if enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ebadkamil committed Mar 17, 2021
1 parent 1d32497 commit 576bfb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nexus_constructor/treeview_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ def set_enabled_and_raise(action: QAction, value: bool):
for widget in action.associatedWidgets():
if isinstance(widget, QToolButton):
widget.setAutoRaise(not value)
# Change background color to pale gray if button is enabled
color = "#d7d6d5" if value else "white"
widget.setStyleSheet(f"background-color: {color}")


def handle_number_of_items_selected_is_not_one(
Expand Down

0 comments on commit 576bfb0

Please sign in to comment.