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

Commit

Permalink
Merge pull request #853 from ess-dmsc/ECDC-2397_icons_background_color
Browse files Browse the repository at this point in the history
ECDC-2397: Change toolbar button background color if enabled
  • Loading branch information
kmurica authored Mar 17, 2021
2 parents 1d32497 + 576bfb0 commit ba3a767
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 ba3a767

Please sign in to comment.