Skip to content

Commit

Permalink
Merge pull request #353 from jchanvfx/stylesheet_fix_#351
Browse files Browse the repository at this point in the history
Stylesheet fix #351
  • Loading branch information
jchanvfx committed Jul 3, 2023
2 parents 1c49c36 + 1985cd2 commit aeb5e70
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions NodeGraphQt/base/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ def run_command(self):
"""
self.qaction.trigger()

def set_enabled(self, state):
"""
Sets the command to either be enabled or disabled.
Args:
state (bool): true to enable.
"""
self.qaction.setEnabled(state)

def show(self):
"""
Set the command to be visible in the context menu.
Expand Down
2 changes: 1 addition & 1 deletion NodeGraphQt/pkg_info.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
__version__ = '0.6.5'
__version__ = '0.6.6'
__status__ = 'Work in Progress'
__license__ = 'MIT'

Expand Down
5 changes: 5 additions & 0 deletions NodeGraphQt/widgets/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ def __init__(self, *args, **kwargs):
'background-color': 'rgba({0},{1},{2},200)'
.format(*selected_color),
},
'QMenu::item:disabled': {
'color': 'rgba({0},{1},{2},60)'.format(*text_color),
'background-color': 'rgba({0},{1},{2},200)'
.format(*ViewerEnum.BACKGROUND_COLOR.value),
},
'QMenu::separator': {
'height': '1px',
'background': 'rgba({0},{1},{2}, 50)'.format(*text_color),
Expand Down

0 comments on commit aeb5e70

Please sign in to comment.