[Gui] Ensure Read Only Booleans in PropertyEditor are shown using Disabled Text Color (#27429)

* Ensure read only Booleans are shown using Disabled Text color
* Make the disabled text color a more significant contrast to enabled
* Ensure correct contrasting color for Axis letters versus background color for both Light and Dark themes

(cherry picked from commit ba030237b7)
This commit is contained in:
Syres916
2026-02-14 10:43:53 +01:00
committed by Max Wilfinger
parent c29185075d
commit 6006f581c3
4 changed files with 9 additions and 2 deletions
@@ -117,6 +117,7 @@
<FCBool Name="Simple" Value="1"/>
<FCBool Name="UseBackgroundColorMid" Value="0"/>
<FCUInt Name="AnnotationTextColor" Value="2914369023"/>
<FCUInt Name="AxisLetterColor" Value="3301229823"/>
<FCUInt Name="BackgroundColor" Value="522133503"/>
<FCUInt Name="BoundingBoxColor" Value="4059297279"/>
<FCUInt Name="CbLabelColor" Value="2914369023"/>
@@ -130,6 +130,7 @@
<FCBool Name="Simple" Value="1"/>
<FCBool Name="UseBackgroundColorMid" Value="0"/>
<FCUInt Name="AnnotationTextColor" Value="876232959"/>
<FCUInt Name="AxisLetterColor" Value="255"/>
<FCUInt Name="BackgroundColor" Value="4160223231"/>
<FCUInt Name="BoundingBoxColor" Value="1230002175"/>
<FCUInt Name="CbLabelColor" Value="556083711"/>
@@ -53,7 +53,7 @@ StylesheetIconsColor: "white"
TabbarBackgroundColor: "@PrimaryColorDarken5"
InActiveTabBackgroundColor: "@PrimaryColorDarken2"
ActiveTabBackgroundColor: "@3DViewBackgroundRefColor"
TextDisabledColor: "darken(@TextForegroundColor,40)"
TextDisabledColor: "darken(@TextForegroundColor,120)"
TextEditFieldBackgroundColor: "@PrimaryColor"
TextForegroundColor: "#ffffff"
TextSelectBackgroundColor: "darken(@AccentColor,100)"
@@ -148,7 +148,12 @@ void PropertyItemDelegate::paint(
option.rect.right() - (checkboxOption.rect.right() + spacing),
checkboxOption.rect.height()
);
painter->setPen(palette.color(QPalette::Text));
if (readonly) {
painter->setPen(palette.color(QPalette::Disabled, QPalette::Text));
}
else {
painter->setPen(palette.color(QPalette::Text));
}
painter->drawText(textRect, Qt::AlignVCenter | Qt::AlignLeft, labelText);
}
else {