From b3e80ce417b82a5dc628d5a60bd494eb27a676bd Mon Sep 17 00:00:00 2001 From: wijnand Date: Fri, 4 May 2018 12:26:23 +0200 Subject: [PATCH] Removed hack, apply stylesheet from style module --- colorbleed/plugins/fusion/inventory/set_tool_color.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/colorbleed/plugins/fusion/inventory/set_tool_color.py b/colorbleed/plugins/fusion/inventory/set_tool_color.py index b54e772e96..fca87b0b71 100644 --- a/colorbleed/plugins/fusion/inventory/set_tool_color.py +++ b/colorbleed/plugins/fusion/inventory/set_tool_color.py @@ -1,4 +1,4 @@ -from avalon import api +from avalon import api, style from avalon.vendor.Qt import QtGui, QtWidgets import avalon.fusion @@ -50,12 +50,8 @@ class FusionSetToolColor(api.InventoryAction): """ - app = QtWidgets.QApplication.instance() - widgets = dict((w.objectName(), w) for w in app.allWidgets()) - widget = widgets.get("SceneInventory") - color_dialog = QtWidgets.QColorDialog(color) - color_dialog.setStyleSheet(widget.styleSheet()) + color_dialog.setStyleSheet(style.load_stylesheet()) accepted = color_dialog.exec_() picked_color = color_dialog.selectedColor() if accepted else False