From b19644446da4fc6eb85aa7b554a335d7b59190a8 Mon Sep 17 00:00:00 2001 From: MK Date: Sat, 11 Mar 2023 21:09:21 +0100 Subject: [PATCH] Changed text color of the tab search to be more visable. Reference taken from widgets/actions.py --- NodeGraphQt/widgets/tab_search.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/NodeGraphQt/widgets/tab_search.py b/NodeGraphQt/widgets/tab_search.py index 72685b5d..477342f8 100644 --- a/NodeGraphQt/widgets/tab_search.py +++ b/NodeGraphQt/widgets/tab_search.py @@ -57,7 +57,9 @@ def __init__(self, parent=None): super(TabSearchLineEditWidget, self).__init__(parent) self.setAttribute(QtCore.Qt.WA_MacShowFocusRect, 0) self.setMinimumSize(200, 22) - text_color = self.palette().text().color().getRgb() + # text_color = self.palette().text().color().getRgb() + text_color = tuple(map(lambda i, j: i - j, (255, 255, 255), + ViewerEnum.BACKGROUND_COLOR.value)) selected_color = self.palette().highlight().color().getRgb() style_dict = { 'QLineEdit': { @@ -108,7 +110,9 @@ def __init__(self, node_dict=None): search_widget.setDefaultWidget(self.line_edit) self.addAction(search_widget) - text_color = self.palette().text().color().getRgb() + # text_color = self.palette().text().color().getRgb() + text_color = tuple(map(lambda i, j: i - j, (255, 255, 255), + ViewerEnum.BACKGROUND_COLOR.value)) selected_color = self.palette().highlight().color().getRgb() style_dict = { 'QMenu': {