From c92f65f5804c7e8cb8eee62f89a6c0394264a9ea Mon Sep 17 00:00:00 2001 From: Mohamed Farahat Date: Sat, 23 Jan 2021 03:54:51 +0200 Subject: [PATCH] fixed text problem when renaming node. --- GlassGui.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/GlassGui.py b/GlassGui.py index 2ff312c..4aec924 100644 --- a/GlassGui.py +++ b/GlassGui.py @@ -93,8 +93,9 @@ def applyGlass(boolean, widget): widget.setAttribute(QtCore.Qt.WA_TranslucentBackground, boolean) except: pass + transparent_classes = [QtGui.QScrollBar, QtGui.QLineEdit, QtGui.QAbstractButton, QtGui.QHeaderView, QtGui.QDockWidget] try: - if boolean: + if boolean and (widget.__class__ in transparent_classes) or (widget.objectName() in ['qt_scrollarea_hcontainer', 'qt_scrollarea_vcontainer']): widget.setStyleSheet("background:transparent; border:none; color:white;") else: widget.setStyleSheet("") @@ -151,8 +152,10 @@ def widgetList(boolean): child = True for child in children: - applyGlass(boolean, child) - + if isinstance(child, QtGui.QWidget): + applyGlass(boolean, child) + if boolean: + dock.setStyleSheet("") def setMode(): """Set dock or overlay widget mode."""