From cb95cb064ff35687e632b558de8a35ef4dfc17c3 Mon Sep 17 00:00:00 2001 From: Alfredo Monclus Date: Mon, 26 May 2025 07:13:44 -0600 Subject: [PATCH] Gui: property-editor make readonly cells look disabled --- src/Gui/propertyeditor/PropertyItemDelegate.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Gui/propertyeditor/PropertyItemDelegate.cpp b/src/Gui/propertyeditor/PropertyItemDelegate.cpp index b5c07a45a6..73abaf8464 100644 --- a/src/Gui/propertyeditor/PropertyItemDelegate.cpp +++ b/src/Gui/propertyeditor/PropertyItemDelegate.cpp @@ -82,6 +82,9 @@ void PropertyItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem & } else if (index.column() == 1) { option.state &= ~QStyle::State_Selected; + if (property && property->isReadOnly()) { + option.state &= ~QStyle::State_Enabled; + } } option.state &= ~QStyle::State_HasFocus;