Skip to content

Commit aeb5e70

Browse files
authored
Merge pull request #353 from jchanvfx/stylesheet_fix_#351
Stylesheet fix #351
2 parents 1c49c36 + 1985cd2 commit aeb5e70

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

NodeGraphQt/base/menu.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,15 @@ def run_command(self):
295295
"""
296296
self.qaction.trigger()
297297

298+
def set_enabled(self, state):
299+
"""
300+
Sets the command to either be enabled or disabled.
301+
302+
Args:
303+
state (bool): true to enable.
304+
"""
305+
self.qaction.setEnabled(state)
306+
298307
def show(self):
299308
"""
300309
Set the command to be visible in the context menu.

NodeGraphQt/pkg_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python
22
# -*- coding: utf-8 -*-
3-
__version__ = '0.6.5'
3+
__version__ = '0.6.6'
44
__status__ = 'Work in Progress'
55
__license__ = 'MIT'
66

NodeGraphQt/widgets/actions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ def __init__(self, *args, **kwargs):
3030
'background-color': 'rgba({0},{1},{2},200)'
3131
.format(*selected_color),
3232
},
33+
'QMenu::item:disabled': {
34+
'color': 'rgba({0},{1},{2},60)'.format(*text_color),
35+
'background-color': 'rgba({0},{1},{2},200)'
36+
.format(*ViewerEnum.BACKGROUND_COLOR.value),
37+
},
3338
'QMenu::separator': {
3439
'height': '1px',
3540
'background': 'rgba({0},{1},{2}, 50)'.format(*text_color),

0 commit comments

Comments
 (0)